From 37b708ef52b70777196f81dcda5f893ad859bd9c Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sat, 15 Jun 2019 10:02:23 +0300 Subject: [PATCH] remove workaround for X11 struts !compositing gap --- app/wm/xwindowinterface.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/app/wm/xwindowinterface.cpp b/app/wm/xwindowinterface.cpp index d68fc9b87..40351bd42 100644 --- a/app/wm/xwindowinterface.cpp +++ b/app/wm/xwindowinterface.cpp @@ -91,17 +91,12 @@ void XWindowInterface::setViewStruts(QWindow &view, const QRect &rect const QRect currentScreen {screen->geometry()}; const QRect wholeScreen {{0, 0}, screen->virtualSize()}; - //! WORKAROUND in order to fix KWin faulty behavior concerning struts - //! under !compositing mode. Under !compositing mode, kwin removes 1px. - //! from the struts - const int strutsGap = KWindowSystem::compositingActive ? 1 : 2; - switch (location) { case Plasma::Types::TopEdge: { const int topOffset {screen->geometry().top()}; strut.top_width = rect.height() + topOffset; strut.top_start = rect.x(); - strut.top_end = rect.x() + rect.width() - strutsGap; + strut.top_end = rect.x() + rect.width() - 1; break; } @@ -109,7 +104,7 @@ void XWindowInterface::setViewStruts(QWindow &view, const QRect &rect const int bottomOffset {wholeScreen.bottom() - currentScreen.bottom()}; strut.bottom_width = rect.height() + bottomOffset; strut.bottom_start = rect.x(); - strut.bottom_end = rect.x() + rect.width() - strutsGap; + strut.bottom_end = rect.x() + rect.width() - 1; break; } @@ -117,7 +112,7 @@ void XWindowInterface::setViewStruts(QWindow &view, const QRect &rect const int leftOffset = {screen->geometry().left()}; strut.left_width = rect.width() + leftOffset; strut.left_start = rect.y(); - strut.left_end = rect.y() + rect.height() - strutsGap; + strut.left_end = rect.y() + rect.height() - 1; break; } @@ -125,7 +120,7 @@ void XWindowInterface::setViewStruts(QWindow &view, const QRect &rect const int rightOffset = {wholeScreen.right() - currentScreen.right()}; strut.right_width = rect.width() + rightOffset; strut.right_start = rect.y(); - strut.right_end = rect.y() + rect.height() - strutsGap; + strut.right_end = rect.y() + rect.height() - 1; break; }