From 80f6eb94aa701c3a7cd89dc15d3fb12aac0a5003 Mon Sep 17 00:00:00 2001 From: bbedward Date: Tue, 25 Nov 2025 12:25:40 -0500 Subject: [PATCH] appdrawer: fix not getting mouse events sometimes --- .../Modules/AppDrawer/AppDrawerPopout.qml | 21 +++++++------------ quickshell/Widgets/DankPopout.qml | 14 ++++++++----- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/quickshell/Modules/AppDrawer/AppDrawerPopout.qml b/quickshell/Modules/AppDrawer/AppDrawerPopout.qml index cb834812..2535f8ff 100644 --- a/quickshell/Modules/AppDrawer/AppDrawerPopout.qml +++ b/quickshell/Modules/AppDrawer/AppDrawerPopout.qml @@ -15,8 +15,6 @@ DankPopout { layerNamespace: "dms:app-launcher" - property var triggerScreen: null - function show() { open() } @@ -25,21 +23,16 @@ DankPopout { popupHeight: 600 triggerWidth: 40 positioning: "" - screen: triggerScreen onBackgroundClicked: close() - onShouldBeVisibleChanged: { - if (shouldBeVisible) { - appLauncher.searchQuery = "" - appLauncher.selectedIndex = 0 - appLauncher.setCategory(I18n.tr("All")) - Qt.callLater(() => { - if (contentLoader.item && contentLoader.item.searchField) { - contentLoader.item.searchField.text = "" - contentLoader.item.searchField.forceActiveFocus() - } - }) + onOpened: { + appLauncher.searchQuery = "" + appLauncher.selectedIndex = 0 + appLauncher.setCategory(I18n.tr("All")) + if (contentLoader.item?.searchField) { + contentLoader.item.searchField.text = "" + contentLoader.item.searchField.forceActiveFocus() } } diff --git a/quickshell/Widgets/DankPopout.qml b/quickshell/Widgets/DankPopout.qml index 64df7226..06e881bb 100644 --- a/quickshell/Widgets/DankPopout.qml +++ b/quickshell/Widgets/DankPopout.qml @@ -100,11 +100,15 @@ Item { return; closeTimer.stop(); shouldBeVisible = true; - if (useBackgroundWindow) - backgroundWindow.visible = true; - contentWindow.visible = true; - PopoutManager.showPopout(root); - opened(); + Qt.callLater(() => { + if (shouldBeVisible) { + if (useBackgroundWindow) + backgroundWindow.visible = true; + contentWindow.visible = true; + PopoutManager.showPopout(root); + opened(); + } + }); } function close() {