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
This commit is contained in:
parent
39e7b26243
commit
ba4e42d139
1 changed files with 3 additions and 0 deletions
|
@ -357,6 +357,9 @@ void ShellClient::createDecoration(const QRect &oldGeom)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
setDecoration(decoration);
|
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);
|
emit geometryShapeChanged(this, oldGeom);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue