diff --git a/shell_client.cpp b/shell_client.cpp index a3a80cd532..9a184caec4 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -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;