From ba4e42d139b3a7b311608cf112ff360d02cad0f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 10 Jun 2016 10:52:41 +0200 Subject: [PATCH] Update window geometry when creating the decoration in ShellClient Summary: When managing a new decorated ShellClient we observed that the window gets placed with a wrong geometry and on next damage event expands into a strutted area. The main reason for this behavior is that the window geometry did not get updated when creating the decoration. With this change the geometry gets updated, so that the placement is performed on the correct geometry. The change itself does not yet cover all conditions. E.g. a maximized windows which will get decorations will be incorrectly sized. This requires further changes. Reviewers: #kwin, #plasma_on_wayland Subscribers: plasma-devel, kwin Tags: #plasma_on_wayland, #kwin Differential Revision: https://phabricator.kde.org/D1812 --- shell_client.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shell_client.cpp b/shell_client.cpp index 391707cab1..7128cebd43 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -357,6 +357,9 @@ void ShellClient::createDecoration(const QRect &oldGeom) ); } setDecoration(decoration); + // TODO: ensure the new geometry still fits into the client area (e.g. maximized windows) + doSetGeometry(QRect(oldGeom.topLeft(), m_clientSize + QSize(decoration->borderLeft() + decoration->borderRight(), + decoration->borderBottom() + decoration->borderTop()))); emit geometryShapeChanged(this, oldGeom); }