summaryrefslogtreecommitdiff
path: root/lib/hyprland
diff options
context:
space:
mode:
authorAylur <[email protected]>2024-11-24 20:21:30 +0000
committerAylur <[email protected]>2024-11-24 20:21:30 +0000
commit3f554403ff92d6603ff04d13f26a71aba41375df (patch)
tree0c44e0a4cc997cc4b568cb170494c668f8d60f15 /lib/hyprland
parent3e6c7eeb1c96b5afba82f5fdc2ab35c78f383b38 (diff)
fix(hyprland): client creation
resolve #124 resolve #131
Diffstat (limited to 'lib/hyprland')
-rw-r--r--lib/hyprland/hyprland.vala27
1 files changed, 14 insertions, 13 deletions
diff --git a/lib/hyprland/hyprland.vala b/lib/hyprland/hyprland.vala
index 17c426c..663eb19 100644
--- a/lib/hyprland/hyprland.vala
+++ b/lib/hyprland/hyprland.vala
@@ -318,8 +318,19 @@ public class Hyprland : Object {
focused_workspace = get_workspace_by_name(argv[1]);
break;
+ // first event that signals a new client
case "activewindowv2":
- focused_client = get_client(args[1]);
+ if (args[1] != "" && get_client(args[1]) == null) {
+ var client = new Client();
+ _clients.insert(args[1], client);
+ yield sync_clients();
+ yield sync_workspaces();
+ client_added(client);
+ notify_property("clients");
+ focused_client = client;
+ } else {
+ focused_client = get_client(args[1]);
+ }
break;
// TODO: nag vaxry for fullscreenv2 that passes address
@@ -421,19 +432,9 @@ public class Hyprland : Object {
minimize(get_client(argv[0]), argv[1] == "0");
break;
- // first event that signals a new window not openwindow
- case "windowtitlev2":
- var addr = args[1].split(",")[0];
- var client = new Client();
- _clients.insert(addr, client);
- yield sync_clients();
- yield sync_workspaces();
- client_added(client);
- notify_property("clients");
- break;
-
+ // nothing to update
case "windowtitle":
- yield sync_clients();
+ case "windowtitlev2":
break;
// TODO: