From db3615805ce91ba66b03154660c7efcf4f0625f2 Mon Sep 17 00:00:00 2001 From: bbedward Date: Thu, 2 Jul 2026 14:55:09 -0400 Subject: [PATCH] process list: use onClosed signal to call hide() fixes #2560 --- quickshell/Modals/ProcessListModal.qml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/quickshell/Modals/ProcessListModal.qml b/quickshell/Modals/ProcessListModal.qml index 83bdb7430..55be5cbc9 100644 --- a/quickshell/Modals/ProcessListModal.qml +++ b/quickshell/Modals/ProcessListModal.qml @@ -48,19 +48,22 @@ FloatingWindow { log.warn("dgop is not available"); return; } - if (visible) { - const modalTitle = I18n.tr("System Monitor", "sysmon window title"); - for (const toplevel of ToplevelManager.toplevels.values) { - if (toplevel.title !== "System Monitor" && toplevel.title !== modalTitle) - continue; - if (toplevel.activated) { - hide(); - return; - } - toplevel.activate(); + if (!visible) { + show(); + return; + } + const modalTitle = I18n.tr("System Monitor", "sysmon window title"); + for (const toplevel of ToplevelManager.toplevels.values) { + if (toplevel.title !== "System Monitor" && toplevel.title !== modalTitle) + continue; + if (toplevel.activated) { + hide(); return; } + toplevel.activate(); + return; } + hide(); show(); } @@ -90,6 +93,8 @@ FloatingWindow { color: Theme.surfaceContainer visible: false + onClosed: hide() + onCurrentTabChanged: { if (visible && currentTab === 0 && searchField.visible) searchField.forceActiveFocus();