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
This commit is contained in:
Vlad Zahorodnii 2020-01-10 12:05:29 +02:00
parent 928554698b
commit 6e910c455d

View file

@ -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