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
pull/27/head
Michail Vourlakos 3 years ago
parent abcacface8
commit 0f7a4bcd10

@ -433,22 +433,17 @@ bool VisibilityManager::canSetStrut() const
return false; 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; 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) { if (qGuiApp->screens().count() < 2) {
return true; return true;
} }
/*Alternative DEs*/
const QRect thisScreen = m_latteView->screen()->geometry(); 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 // Extended struts against a screen edge near to another screen are really harmful, so windows maximized under the panel is a lesser pain

Loading…
Cancel
Save