diff --git a/app/view/effects.cpp b/app/view/effects.cpp index f3d326f3c..39a7d28d4 100644 --- a/app/view/effects.cpp +++ b/app/view/effects.cpp @@ -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) { diff --git a/app/view/view.cpp b/app/view/view.cpp index 0d1a0933f..aea98a313 100644 --- a/app/view/view.cpp +++ b/app/view/view.cpp @@ -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(); diff --git a/app/view/view.h b/app/view/view.h index 0feb28a33..4525a4017 100644 --- a/app/view/view.h +++ b/app/view/view.h @@ -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); diff --git a/app/view/visibilitymanager.cpp b/app/view/visibilitymanager.cpp index 0af7803c3..b68b146bf 100644 --- a/app/view/visibilitymanager.cpp +++ b/app/view/visibilitymanager.cpp @@ -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 diff --git a/shell/package/contents/configuration/pages/BehaviorConfig.qml b/shell/package/contents/configuration/pages/BehaviorConfig.qml index f406e0ac1..e4aae732a 100644 --- a/shell/package/contents/configuration/pages/BehaviorConfig.qml +++ b/shell/package/contents/configuration/pages/BehaviorConfig.qml @@ -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; } }