From 7c7fb758ad66033c63354c0d71780eb47dc218ce Mon Sep 17 00:00:00 2001 From: Roman Gilg Date: Wed, 5 Jun 2019 15:35:31 +0200 Subject: [PATCH] Avoid again invalid geometry of internal clients Summary: This adds again the workaround from 1fb2eace3fbf, which got temporarily removed by 9b922f88332f. BUG: 386304 Test Plan: Manually Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D21601 --- shell_client.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shell_client.cpp b/shell_client.cpp index c481db9f5b..ff7ee34c67 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -1211,7 +1211,12 @@ void ShellClient::installPlasmaShellSurface(PlasmaShellSurfaceInterface *surface m_plasmaShellSurface = surface; auto updatePosition = [this, surface] { QRect rect = QRect(surface->position(), m_clientSize + QSize(borderLeft() + borderRight(), borderTop() + borderBottom())); - doSetGeometry(rect); + // Shell surfaces of internal windows are sometimes desync to current value. + // Make sure to not set window geometry of internal windows to invalid values (bug 386304). + // This is a workaround. + if (!m_internal || rect.isValid()) { + doSetGeometry(rect); + } }; auto updateRole = [this, surface] { NET::WindowType type = NET::Unknown;