mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-07 09:18:03 +03:00
disable "CanBeAboveFullscreen" properly
--fix how CanBeAboveFullscreen windows option can be enabled/disabled properly and work correctly --fix how Blur is handled for docks and panels that can be AboveFullScreenWindows under X11. Blur is now working correctly for them but of course GtkFrameExtents do not work at all because they are intended to work based on KWin implementation. BUG:443536
This commit is contained in:
parent
c521112cea
commit
008a9c6038
@ -577,7 +577,7 @@ void Effects::updateEffects()
|
||||
//! Latte is now using GtkFrameExtents so Effects geometries must be adjusted
|
||||
//! windows that use GtkFrameExtents and apply Effects on them they take GtkFrameExtents
|
||||
//! as granted
|
||||
if (KWindowSystem::isPlatformX11()) {
|
||||
if (KWindowSystem::isPlatformX11() && !m_view->byPassWM()) {
|
||||
if (m_view->location() == Plasma::Types::BottomEdge) {
|
||||
fY = qMax(0, fY - m_view->headThicknessGap());
|
||||
} else if (m_view->location() == Plasma::Types::RightEdge) {
|
||||
|
@ -62,10 +62,10 @@
|
||||
|
||||
namespace Latte {
|
||||
|
||||
//! both alwaysVisible and byPassWM are passed through corona because
|
||||
//! both alwaysVisible and byPassWMX11 are passed through corona because
|
||||
//! during the view window creation containment hasn't been set, but these variables
|
||||
//! are needed in order for window flags to be set correctly
|
||||
View::View(Plasma::Corona *corona, QScreen *targetScreen, bool byPassWM)
|
||||
View::View(Plasma::Corona *corona, QScreen *targetScreen, bool byPassX11WM)
|
||||
: PlasmaQuick::ContainmentView(corona),
|
||||
m_contextMenu(new ViewPart::ContextMenu(this)),
|
||||
m_effects(new ViewPart::Effects(this)),
|
||||
@ -90,8 +90,10 @@ View::View(Plasma::Corona *corona, QScreen *targetScreen, bool byPassWM)
|
||||
| Qt::NoDropShadowWindowHint
|
||||
| Qt::WindowDoesNotAcceptFocus;
|
||||
|
||||
if (byPassWM) {
|
||||
if (byPassX11WM) {
|
||||
setFlags(flags | Qt::BypassWindowManagerHint);
|
||||
//! needs to be set early enough
|
||||
m_byPassWM = byPassX11WM;
|
||||
} else {
|
||||
setFlags(flags);
|
||||
}
|
||||
@ -109,7 +111,7 @@ View::View(Plasma::Corona *corona, QScreen *targetScreen, bool byPassWM)
|
||||
connect(m_interface, &ViewPart::ContainmentInterface::hasExpandedAppletChanged, this, &View::updateTransientWindowsTracking);
|
||||
|
||||
connect(this, &View::containmentChanged
|
||||
, this, [ &, byPassWM]() {
|
||||
, this, [ &, byPassX11WM]() {
|
||||
qDebug() << "dock view c++ containment changed 1...";
|
||||
|
||||
if (!this->containment())
|
||||
@ -123,7 +125,7 @@ View::View(Plasma::Corona *corona, QScreen *targetScreen, bool byPassWM)
|
||||
restoreConfig();
|
||||
|
||||
//! Afterwards override that values in case during creation something different is needed
|
||||
setByPassWM(byPassWM);
|
||||
setByPassWM(byPassX11WM);
|
||||
|
||||
//! Check the screen assigned to this dock
|
||||
reconsiderScreen();
|
||||
|
@ -128,7 +128,7 @@ class View : public PlasmaQuick::ContainmentView
|
||||
Q_PROPERTY(QRect screenGeometry READ screenGeometry NOTIFY screenGeometryChanged)
|
||||
|
||||
public:
|
||||
View(Plasma::Corona *corona, QScreen *targetScreen = nullptr, bool byPassWM = false);
|
||||
View(Plasma::Corona *corona, QScreen *targetScreen = nullptr, bool byPassX11WM = false);
|
||||
virtual ~View();
|
||||
|
||||
void init(Plasma::Containment *plasma_containment = nullptr);
|
||||
|
@ -113,6 +113,11 @@ VisibilityManager::VisibilityManager(PlasmaQuick::ContainmentView *view)
|
||||
connect(this, &VisibilityManager::modeChanged, this, [&]() {
|
||||
emit m_latteView->availableScreenRectChangedFrom(m_latteView);
|
||||
});
|
||||
|
||||
//! Send frame extents on startup, this is really necessary when recreating a view.
|
||||
//! Such a case is when toggling byPassWM and a view is recreated after disabling editing mode
|
||||
const bool forceUpdate{true};
|
||||
publishFrameExtents(forceUpdate);
|
||||
}
|
||||
|
||||
m_timerStartUp.setInterval(4000);
|
||||
@ -603,10 +608,10 @@ void VisibilityManager::publishFrameExtents(bool forceUpdate)
|
||||
frameExtents.setTop(m_frameExtentsHeadThicknessGap);
|
||||
}
|
||||
|
||||
qDebug() << " -> Frame Extents :: " << m_frameExtentsLocation << " __ " << " extents :: " << frameExtents;
|
||||
|
||||
bool bypasswm{m_latteView->byPassWM() && KWindowSystem::isPlatformX11()};
|
||||
|
||||
qDebug() << " -> Frame Extents :: " << m_frameExtentsLocation << " __ " << " extents :: " << frameExtents << " bypasswm :: " << bypasswm;
|
||||
|
||||
if (!frameExtents.isNull() && !m_latteView->behaveAsPlasmaPanel() && !bypasswm) {
|
||||
//! When a view returns its frame extents to zero then that triggers a compositor
|
||||
//! strange behavior that moves/hides the view totally and freezes entire Latte
|
||||
|
@ -915,7 +915,7 @@ PlasmaComponents.Page {
|
||||
tooltip: i18n("BypassWindowManagerHint flag for the window. The view will be above all windows even those set as 'Always On Top'")
|
||||
value: latteView.byPassWM
|
||||
|
||||
onCheckedChanged: {
|
||||
onClicked: {
|
||||
latteView.byPassWM = !latteView.byPassWM;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user