overview make window focus work more

This commit is contained in:
end-4
2025-04-30 23:12:19 +02:00
parent f0c1f0adff
commit 1aa721dac8
@@ -1,3 +1,4 @@
import "root:/"
import "root:/services/" import "root:/services/"
import "root:/modules/common" import "root:/modules/common"
import "root:/modules/common/widgets" import "root:/modules/common/widgets"
@@ -86,7 +87,8 @@ Item {
acceptedButtons: Qt.LeftButton acceptedButtons: Qt.LeftButton
onClicked: { onClicked: {
if (root.draggingTargetWorkspace === -1) { if (root.draggingTargetWorkspace === -1) {
Hyprland.dispatch(`global quickshell:overviewClose`) // Hyprland.dispatch(`exec qs ipc call overview close`)
GlobalStates.overviewOpen = false
Hyprland.dispatch(`workspace ${workspaceValue}`) Hyprland.dispatch(`workspace ${workspaceValue}`)
} }
} }
@@ -186,8 +188,8 @@ Item {
if (!windowData) return; if (!windowData) return;
if (event.button === Qt.LeftButton) { if (event.button === Qt.LeftButton) {
Hyprland.dispatch(`global quickshell:overviewClose`) GlobalStates.overviewOpen = false
Hyprland.dispatch(`workspace ${windowData.workspace.id}`) Hyprland.dispatch(`focuswindow address:${windowData.address}`)
event.accepted = true event.accepted = true
} else if (event.button === Qt.MiddleButton) { } else if (event.button === Qt.MiddleButton) {
Hyprland.dispatch(`closewindow address:${windowData.address}`) Hyprland.dispatch(`closewindow address:${windowData.address}`)