From 273246b99c34716492bc2acecf95f6d37e71075e Mon Sep 17 00:00:00 2001 From: Lemmy Date: Fri, 8 May 2026 23:32:35 -0400 Subject: [PATCH] launcher: skip close animation --- src/shell/launcher/launcher_panel.h | 1 + src/shell/panel/panel.h | 1 + src/shell/panel/panel_manager.cpp | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/shell/launcher/launcher_panel.h b/src/shell/launcher/launcher_panel.h index 8642598ec..e8e163b97 100644 --- a/src/shell/launcher/launcher_panel.h +++ b/src/shell/launcher/launcher_panel.h @@ -43,6 +43,7 @@ public: [[nodiscard]] LayerShellKeyboard keyboardMode() const override { return LayerShellKeyboard::Exclusive; } [[nodiscard]] InputArea* initialFocusArea() const override; [[nodiscard]] bool prefersAttachedToBar() const noexcept override; + [[nodiscard]] bool wantsCloseAnimation() const noexcept override { return false; } private: void doLayout(Renderer& renderer, float width, float height) override; diff --git a/src/shell/panel/panel.h b/src/shell/panel/panel.h index 7b2a1070c..b71a5bace 100644 --- a/src/shell/panel/panel.h +++ b/src/shell/panel/panel.h @@ -64,6 +64,7 @@ public: // a fixed alpha for legibility (e.g. wallpaper thumbnails). [[nodiscard]] virtual bool inheritsBarBackgroundOpacity() const noexcept { return true; } [[nodiscard]] virtual float attachedBackgroundOpacityOverride() const noexcept { return 1.0f; } + [[nodiscard]] virtual bool wantsCloseAnimation() const noexcept { return true; } [[nodiscard]] Node* root() const noexcept { return m_root ? m_root.get() : m_rootPtr; } [[nodiscard]] float contentScale() const noexcept { return m_contentScale; } diff --git a/src/shell/panel/panel_manager.cpp b/src/shell/panel/panel_manager.cpp index 25f186c88..e29b743be 100644 --- a/src/shell/panel/panel_manager.cpp +++ b/src/shell/panel/panel_manager.cpp @@ -606,7 +606,7 @@ void PanelManager::closePanel() { m_inputDispatcher.setSceneRoot(nullptr); m_closing = true; - if (m_sceneRoot != nullptr) { + if (m_sceneRoot != nullptr && m_activePanel != nullptr && m_activePanel->wantsCloseAnimation()) { const std::uint64_t gen = ++m_destroyGeneration; if (m_attachedToBar && m_attachedRevealClipNode != nullptr) { m_animations.cancelForOwner(m_attachedRevealClipNode);