From 8bd168a5a53e88f56b4f0ce674b1a214db53f6ea Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Wed, 29 Dec 2021 18:49:04 +0200 Subject: [PATCH] always trust KWin for setting struts --when kwin is running then we should always trust it in order to provide correct struts. That applies also under x11 where other wms might fail. BUG:447595 FIXEX-IN:0.10.7 --- app/view/visibilitymanager.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/app/view/visibilitymanager.cpp b/app/view/visibilitymanager.cpp index cb42b824f..711fe32e5 100644 --- a/app/view/visibilitymanager.cpp +++ b/app/view/visibilitymanager.cpp @@ -433,22 +433,17 @@ bool VisibilityManager::canSetStrut() const return false; } - if (!KWindowSystem::isPlatformX11() || !m_wm->isKWinRunning()/*alternative de*/) { + if (!KWindowSystem::isPlatformX11() || m_wm->isKWinRunning()) { + // we always trust wayland and kwin to provide proper struts return true; } - // read the wm name, need to do this every time which means a roundtrip unfortunately - // but WM might have changed - //NETRootInfo rootInfo(QX11Info::connection(), NET::Supported | NET::SupportingWMCheck); - //if (qstricmp(rootInfo.wmName(), "KWin") == 0) { - // KWin since 5.7 can handle this fine, so only exclude for other window managers - //return true; - //} - if (qGuiApp->screens().count() < 2) { return true; } + /*Alternative DEs*/ + const QRect thisScreen = m_latteView->screen()->geometry(); // Extended struts against a screen edge near to another screen are really harmful, so windows maximized under the panel is a lesser pain