diff options
author | noname <[email protected]> | 2025-03-07 18:38:26 +1100 |
---|---|---|
committer | noname <[email protected]> | 2025-03-07 19:21:44 +1100 |
commit | fa79458c7f79e22c59485e14c15ddac2ea3184ab (patch) | |
tree | a0257df9dce1ad5f7e684c3442ecb8c81d326e1b /lib/sway/node.vala | |
parent | 6320e13ec8de2af18c09faa2a5c7978051e3b347 (diff) |
fix startup
Diffstat (limited to 'lib/sway/node.vala')
-rw-r--r-- | lib/sway/node.vala | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/sway/node.vala b/lib/sway/node.vala index 9a0332c..8f1e925 100644 --- a/lib/sway/node.vala +++ b/lib/sway/node.vala @@ -66,13 +66,7 @@ public class Node : Object { } } - internal static async void sync_tree() { - var str = yield Sway.get_default().message_async(PayloadType.MESSAGE_GET_TREE, ""); - var obj = Json.from_string(str).get_object(); - if (obj == null) { - return; - } - + internal static async void sync_tree(Json.Object obj) { Node root = build(obj); _temp_nodes = new HashTable<int, Node>(i => i, (a,b) => a==b); root.sync(obj); @@ -99,7 +93,8 @@ public class Node : Object { var arr2 = obj.get_array_member("floating_nodes"); sync_nodes(arr); sync_nodes(arr2); - + + notify_property("windows"); } private void sync_nodes(Json.Array arr) { |