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
This commit is contained in:
parent
1f4682f249
commit
1fb2eace3f
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue