diff --git a/quickshell/Modals/Common/DankModalConnected.qml b/quickshell/Modals/Common/DankModalConnected.qml index cd91b743..b0648a16 100644 --- a/quickshell/Modals/Common/DankModalConnected.qml +++ b/quickshell/Modals/Common/DankModalConnected.qml @@ -262,6 +262,7 @@ Item { clickCatcher.visible = true; if (!contentWindow.visible) contentWindow.visible = true; + opened(); shouldHaveFocus = false; Qt.callLater(() => shouldHaveFocus = Qt.binding(() => shouldBeVisible)); }); @@ -535,13 +536,11 @@ Item { implicitHeight: root.useSingleWindow ? 0 : root.alignedHeight + (shadowBuffer * 2) onVisibleChanged: { - if (visible) { - opened(); - } else { - if (Qt.inputMethod) { - Qt.inputMethod.hide(); - Qt.inputMethod.reset(); - } + if (visible) + return; + if (Qt.inputMethod) { + Qt.inputMethod.hide(); + Qt.inputMethod.reset(); } } diff --git a/quickshell/Modals/Common/DankModalStandalone.qml b/quickshell/Modals/Common/DankModalStandalone.qml index 8d77e529..3bf96a75 100644 --- a/quickshell/Modals/Common/DankModalStandalone.qml +++ b/quickshell/Modals/Common/DankModalStandalone.qml @@ -90,6 +90,7 @@ Item { if (!useSingleWindow) clickCatcher.visible = true; contentWindow.visible = true; + opened(); shouldHaveFocus = false; Qt.callLater(() => shouldHaveFocus = Qt.binding(() => shouldBeVisible)); } @@ -286,13 +287,11 @@ Item { implicitHeight: root.useSingleWindow ? 0 : root.alignedHeight + (shadowBuffer * 2) onVisibleChanged: { - if (visible) { - opened(); - } else { - if (Qt.inputMethod) { - Qt.inputMethod.hide(); - Qt.inputMethod.reset(); - } + if (visible) + return; + if (Qt.inputMethod) { + Qt.inputMethod.hide(); + Qt.inputMethod.reset(); } }