diff --git a/deleted.h b/deleted.h --- a/deleted.h +++ b/deleted.h @@ -172,6 +172,15 @@ return m_transients; } + /** + * Returns whether the client was a popup. + * + * @returns @c true if the client was a popup, @c false otherwise. + **/ + bool isPopupWindow() const override { + return m_wasPopupWindow; + } + protected: virtual void debug(QDebug& stream) const; private Q_SLOTS: @@ -223,6 +232,7 @@ bool m_wasGroupTransient; ToplevelList m_transientFor; DeletedList m_transients; + bool m_wasPopupWindow; }; inline void Deleted::refWindow() diff --git a/deleted.cpp b/deleted.cpp --- a/deleted.cpp +++ b/deleted.cpp @@ -52,6 +52,7 @@ , m_wasX11Client(false) , m_wasWaylandClient(false) , m_wasGroupTransient(false) + , m_wasPopupWindow(false) { } @@ -142,6 +143,7 @@ m_wasWaylandClient = qobject_cast(c) != nullptr; m_wasX11Client = !m_wasWaylandClient; + m_wasPopupWindow = c->isPopupWindow(); } void Deleted::unrefWindow() diff --git a/libkwineffects/kwineffects.cpp b/libkwineffects/kwineffects.cpp --- a/libkwineffects/kwineffects.cpp +++ b/libkwineffects/kwineffects.cpp @@ -785,7 +785,6 @@ bool managed = false; bool waylandClient; bool x11Client; - bool popupWindow; }; EffectWindow::Private::Private(EffectWindow *q) @@ -808,7 +807,6 @@ d->waylandClient = parent->inherits("KWin::ShellClient"); d->x11Client = !d->waylandClient; - d->popupWindow = parent->property("popupWindow").value(); } EffectWindow::~EffectWindow() @@ -858,6 +856,7 @@ WINDOW_HELPER(bool, skipsCloseAnimation, "skipsCloseAnimation") WINDOW_HELPER(KWayland::Server::SurfaceInterface *, surface, "surface") WINDOW_HELPER(QVector, desktops, "x11DesktopIds") +WINDOW_HELPER(bool, isPopupWindow, "popupWindow") QString EffectWindow::windowClass() const { @@ -1020,11 +1019,6 @@ return d->x11Client; } -bool EffectWindow::isPopupWindow() const -{ - return d->popupWindow; -} - //**************************************** // EffectWindowGroup //**************************************** diff --git a/shell_client.cpp b/shell_client.cpp --- a/shell_client.cpp +++ b/shell_client.cpp @@ -1935,6 +1935,9 @@ bool ShellClient::isPopupWindow() const { + if (Toplevel::isPopupWindow()) { + return true; + } if (m_shellSurface != nullptr) { return m_shellSurface->isPopup(); }