Commit 6e910c45 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

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