mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
launcher: skip close animation
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user