1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-30 00:12:50 -05:00

appdrawer: fix not getting mouse events sometimes

This commit is contained in:
bbedward
2025-11-25 12:25:40 -05:00
parent 4035c9cc5f
commit 80f6eb94aa
2 changed files with 16 additions and 19 deletions

View File

@@ -15,8 +15,6 @@ DankPopout {
layerNamespace: "dms:app-launcher" layerNamespace: "dms:app-launcher"
property var triggerScreen: null
function show() { function show() {
open() open()
} }
@@ -25,22 +23,17 @@ DankPopout {
popupHeight: 600 popupHeight: 600
triggerWidth: 40 triggerWidth: 40
positioning: "" positioning: ""
screen: triggerScreen
onBackgroundClicked: close() onBackgroundClicked: close()
onShouldBeVisibleChanged: { onOpened: {
if (shouldBeVisible) {
appLauncher.searchQuery = "" appLauncher.searchQuery = ""
appLauncher.selectedIndex = 0 appLauncher.selectedIndex = 0
appLauncher.setCategory(I18n.tr("All")) appLauncher.setCategory(I18n.tr("All"))
Qt.callLater(() => { if (contentLoader.item?.searchField) {
if (contentLoader.item && contentLoader.item.searchField) {
contentLoader.item.searchField.text = "" contentLoader.item.searchField.text = ""
contentLoader.item.searchField.forceActiveFocus() contentLoader.item.searchField.forceActiveFocus()
} }
})
}
} }
AppLauncher { AppLauncher {

View File

@@ -100,12 +100,16 @@ Item {
return; return;
closeTimer.stop(); closeTimer.stop();
shouldBeVisible = true; shouldBeVisible = true;
Qt.callLater(() => {
if (shouldBeVisible) {
if (useBackgroundWindow) if (useBackgroundWindow)
backgroundWindow.visible = true; backgroundWindow.visible = true;
contentWindow.visible = true; contentWindow.visible = true;
PopoutManager.showPopout(root); PopoutManager.showPopout(root);
opened(); opened();
} }
});
}
function close() { function close() {
shouldBeVisible = false; shouldBeVisible = false;