From 60666c45f2bc18745b2807c3dc42fe5fa1406286 Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Sat, 4 Oct 2025 12:22:59 -0400 Subject: [PATCH] Hyprland: fix taskbar not working and proper event dispatching. --- Services/HyprlandService.qml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Services/HyprlandService.qml b/Services/HyprlandService.qml index 1cd43f1e..c27beba1 100644 --- a/Services/HyprlandService.qml +++ b/Services/HyprlandService.qml @@ -74,7 +74,7 @@ Item { continue const wsData = { - "id": i, + "id": ws.id, "idx": ws.id, "name": ws.name || "", "output": (ws.monitor && ws.monitor.name) ? ws.monitor.name : "", @@ -182,13 +182,15 @@ Item { const title = safeGetProperty(toplevel, "title", "") const wsId = toplevel.workspace ? toplevel.workspace.id : null const focused = toplevel.activated === true + const output = toplevel.monitor?.name || "" return { "id": windowId, "title": title, "appId": appId, "workspaceId": wsId, - "isFocused": focused + "isFocused": focused, + "output": output } } catch (e) { return null @@ -280,7 +282,7 @@ Item { function focusWindow(windowId) { try { - Hyprland.dispatch(`focuswindow ${windowId}`) + Hyprland.dispatch(`focuswindow address:0x${windowId.toString()}`) } catch (e) { Logger.error("HyprlandService", "Failed to switch window:", e) } @@ -288,7 +290,7 @@ Item { function closeWindow(windowId) { try { - Hyprland.dispatch(`killwindow ${windowId}`) + Hyprland.dispatch(`killwindow address:0x${windowId}`) } catch (e) { Logger.error("HyprlandService", "Failed to close window:", e) }