1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-23 01:33:50 +03:00

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
This commit is contained in:
Michail Vourlakos 2021-12-29 18:49:04 +02:00
parent 5ecb8ab767
commit 8bd168a5a5

View File

@ -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