diff --git a/autotests/test_window_paint_data.cpp b/autotests/test_window_paint_data.cpp index 8545a08c05..c004842eab 100644 --- a/autotests/test_window_paint_data.cpp +++ b/autotests/test_window_paint_data.cpp @@ -251,6 +251,9 @@ public: bool isOutline() const override { return false; } + bool isLockScreen() const override { + return false; + } pid_t pid() const override { return 0; } diff --git a/src/deleted.cpp b/src/deleted.cpp index 7442a84e03..d9104c8d61 100644 --- a/src/deleted.cpp +++ b/src/deleted.cpp @@ -37,6 +37,7 @@ Deleted::Deleted() , m_wasPopupWindow(false) , m_wasOutline(false) , m_wasDecorated(false) + , m_wasLockScreen(false) { } @@ -120,6 +121,7 @@ void Deleted::copyToDeleted(Toplevel* c) m_wasPopupWindow = c->isPopupWindow(); m_wasOutline = c->isOutline(); + m_wasLockScreen = c->isLockScreen(); } void Deleted::unrefWindow() diff --git a/src/deleted.h b/src/deleted.h index ea0cd10d26..d0e16d1681 100644 --- a/src/deleted.h +++ b/src/deleted.h @@ -100,6 +100,9 @@ public: bool isOutline() const override { return m_wasOutline; } + bool isLockScreen() const override { + return m_wasLockScreen; + } private Q_SLOTS: void mainClientClosed(KWin::Toplevel *client); @@ -140,6 +143,7 @@ private: bool m_wasPopupWindow; bool m_wasOutline; bool m_wasDecorated; + bool m_wasLockScreen; qreal m_bufferScale = 1; }; diff --git a/src/effects.cpp b/src/effects.cpp index 8223dd66d1..5b93d2cc45 100644 --- a/src/effects.cpp +++ b/src/effects.cpp @@ -1918,6 +1918,7 @@ TOPLEVEL_HELPER(bool, skipsCloseAnimation, skipsCloseAnimation) TOPLEVEL_HELPER(KWaylandServer::SurfaceInterface *, surface, surface) TOPLEVEL_HELPER(bool, isPopupWindow, isPopupWindow) TOPLEVEL_HELPER(bool, isOutline, isOutline) +TOPLEVEL_HELPER(bool, isLockScreen, isLockScreen) TOPLEVEL_HELPER(pid_t, pid, pid) TOPLEVEL_HELPER(qlonglong, windowId, window) diff --git a/src/effects.h b/src/effects.h index c5f71ed1bd..e601050a5b 100644 --- a/src/effects.h +++ b/src/effects.h @@ -463,6 +463,7 @@ public: bool isModal() const override; bool isPopupWindow() const override; bool isOutline() const override; + bool isLockScreen() const override; KWaylandServer::SurfaceInterface *surface() const override; bool isFullScreen() const override; diff --git a/src/effects/glide/glide.cpp b/src/effects/glide/glide.cpp index adfb5bc7b2..243bad119f 100644 --- a/src/effects/glide/glide.cpp +++ b/src/effects/glide/glide.cpp @@ -310,8 +310,8 @@ bool GlideEffect::isGlideWindow(EffectWindow *w) const return false; } - // Don't animate the outline because it looks very sick. - if (w->isOutline()) { + // Don't animate the outline and the screenlocker as it looks bad. + if (w->isLockScreen() || w->isOutline()) { return false; } diff --git a/src/effects/scale/package/contents/code/main.js b/src/effects/scale/package/contents/code/main.js index e399a6293f..3293f226d1 100644 --- a/src/effects/scale/package/contents/code/main.js +++ b/src/effects/scale/package/contents/code/main.js @@ -64,8 +64,8 @@ class ScaleEffect { return false; } - // Dont't animate the outline because it looks very sick. - if (window.outline) { + // Dont't animate the outline and the screenlocker as it looks bad. + if (window.lockScreen || window.outline) { return false; } diff --git a/src/libkwineffects/kwineffects.h b/src/libkwineffects/kwineffects.h index 4b4b722c34..8912b831d4 100644 --- a/src/libkwineffects/kwineffects.h +++ b/src/libkwineffects/kwineffects.h @@ -2170,6 +2170,13 @@ class KWINEFFECTS_EXPORT EffectWindow : public QObject */ Q_PROPERTY(pid_t pid READ pid CONSTANT) + /** + * Whether this EffectWindow represents the screenlocker greeter. + * + * @since 5.22 + */ + Q_PROPERTY(bool lockScreen READ isLockScreen CONSTANT) + public: /** Flags explaining why painting should be disabled */ enum { @@ -2491,6 +2498,11 @@ public: */ virtual bool isOutline() const = 0; + /** + * @since 5.22 + */ + virtual bool isLockScreen() const = 0; + /** * @since 5.18 */ diff --git a/src/waylandclient.cpp b/src/waylandclient.cpp index 686795f6fe..31fdf58901 100644 --- a/src/waylandclient.cpp +++ b/src/waylandclient.cpp @@ -48,6 +48,8 @@ WaylandClient::WaylandClient(SurfaceInterface *surface) this, &WaylandClient::updateIcon); connect(screens(), &Screens::changed, this, &WaylandClient::updateClientOutputs); + connect(surface->client(), &ClientConnection::aboutToBeDestroyed, + this, &WaylandClient::destroyClient); updateResourceName(); updateIcon();