1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-07 05:58:28 -04:00

process list: use onClosed signal to call hide()

fixes #2560
This commit is contained in:
bbedward
2026-07-02 14:55:09 -04:00
parent 8162e60475
commit db3615805c
+15 -10
View File
@@ -48,19 +48,22 @@ FloatingWindow {
log.warn("dgop is not available"); log.warn("dgop is not available");
return; return;
} }
if (visible) { if (!visible) {
const modalTitle = I18n.tr("System Monitor", "sysmon window title"); show();
for (const toplevel of ToplevelManager.toplevels.values) { return;
if (toplevel.title !== "System Monitor" && toplevel.title !== modalTitle) }
continue; const modalTitle = I18n.tr("System Monitor", "sysmon window title");
if (toplevel.activated) { for (const toplevel of ToplevelManager.toplevels.values) {
hide(); if (toplevel.title !== "System Monitor" && toplevel.title !== modalTitle)
return; continue;
} if (toplevel.activated) {
toplevel.activate(); hide();
return; return;
} }
toplevel.activate();
return;
} }
hide();
show(); show();
} }
@@ -90,6 +93,8 @@ FloatingWindow {
color: Theme.surfaceContainer color: Theme.surfaceContainer
visible: false visible: false
onClosed: hide()
onCurrentTabChanged: { onCurrentTabChanged: {
if (visible && currentTab === 0 && searchField.visible) if (visible && currentTab === 0 && searchField.visible)
searchField.forceActiveFocus(); searchField.forceActiveFocus();