Return correct shape for Unmanaged clients

Summary:
Currently EffectWindowImpl::shape() falls back to the frame geometry
because isX11Client() returns invalid value for Unmanaged clients.

BUG: 415475

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26542
master
Vlad Zahorodnii 5 years ago
parent 928554698b
commit 6e910c455d

@ -1736,7 +1736,8 @@ EffectWindowImpl::EffectWindowImpl(Toplevel *toplevel)
managed = toplevel->isClient();
waylandClient = qobject_cast<KWin::XdgShellClient *>(toplevel) != nullptr;
x11Client = qobject_cast<KWin::X11Client *>(toplevel) != nullptr;
x11Client = qobject_cast<KWin::X11Client *>(toplevel) != nullptr ||
qobject_cast<KWin::Unmanaged *>(toplevel) != nullptr;
}
EffectWindowImpl::~EffectWindowImpl()
@ -1954,7 +1955,7 @@ QRegion EffectWindowImpl::shape() const
if (isX11Client() && sceneWindow()) {
return sceneWindow()->bufferShape();
}
return geometry();
return toplevel->rect();
}
QRect EffectWindowImpl::decorationInnerRect() const

Loading…
Cancel
Save