Commit 1fb2eace authored by Roman Gilg's avatar Roman Gilg

Avoid invalid geometry of internal clients through plasma surface interface

Summary:
Internal KWin windows might be not in sync with their PlasmaShellSurface.
This could be a problem in general, but for now atleast guard against
invalid setPosition requests.

BUG: 386304

Test Plan: Manually

Reviewers: #kwin, davidedmundson

Subscribers: davidedmundson, ngraham, graesslin, kwin

Tags: #kwin

Maniphest Tasks: T8771

Differential Revision: https://phabricator.kde.org/D13084
parent 1f4682f2
......@@ -1234,7 +1234,12 @@ void ShellClient::installPlasmaShellSurface(PlasmaShellSurfaceInterface *surface
{
m_plasmaShellSurface = surface;
auto updatePosition = [this, surface] {
doSetGeometry(QRect(surface->position(), m_clientSize + QSize(borderLeft() + borderRight(), borderTop() + borderBottom())));
QRect rect = QRect(surface->position(), m_clientSize + QSize(borderLeft() + borderRight(), borderTop() + borderBottom()));
// 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)
if (!m_internal || rect.isValid()) {
doSetGeometry(rect);
}
};
auto updateRole = [this, surface] {
NET::WindowType type = NET::Unknown;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment