diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-07-16 08:13:58 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-07-16 08:19:25 +1000 |
commit | f86087d78f25575ddadaa4d3496b34e62b545d2e (patch) | |
tree | 07165fbc33946c7c334cc88ac0919e9ce6ba1595 | |
parent | Implement urgency base functionality (diff) | |
download | sway-f86087d78f25575ddadaa4d3496b34e62b545d2e.tar.gz sway-f86087d78f25575ddadaa4d3496b34e62b545d2e.tar.zst sway-f86087d78f25575ddadaa4d3496b34e62b545d2e.zip |
Fix urgency IPC events
-rw-r--r-- | sway/ipc-json.c | 3 | ||||
-rw-r--r-- | sway/tree/view.c | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c index 8c48e724..f9182291 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c | |||
@@ -197,6 +197,9 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object | |||
197 | json_object_object_add(object, "layout", | 197 | json_object_object_add(object, "layout", |
198 | json_object_new_string(ipc_json_layout_description(c->layout))); | 198 | json_object_new_string(ipc_json_layout_description(c->layout))); |
199 | } | 199 | } |
200 | |||
201 | json_object_object_add(object, "urgent", | ||
202 | json_object_new_boolean(view_is_urgent(c->sway_view))); | ||
200 | } | 203 | } |
201 | 204 | ||
202 | static void focus_inactive_children_iterator(struct sway_container *c, void *data) { | 205 | static void focus_inactive_children_iterator(struct sway_container *c, void *data) { |
diff --git a/sway/tree/view.c b/sway/tree/view.c index a2dbe92c..ae520b07 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -1070,8 +1070,10 @@ void view_set_urgent(struct sway_view *view, bool enable) { | |||
1070 | } | 1070 | } |
1071 | container_damage_whole(view->swayc); | 1071 | container_damage_whole(view->swayc); |
1072 | 1072 | ||
1073 | ipc_event_window(view->swayc, "urgent"); | ||
1074 | |||
1073 | struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE); | 1075 | struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE); |
1074 | ipc_event_workspace(ws, NULL, "urgent"); | 1076 | ipc_event_workspace(NULL, ws, "urgent"); |
1075 | } | 1077 | } |
1076 | 1078 | ||
1077 | bool view_is_urgent(struct sway_view *view) { | 1079 | bool view_is_urgent(struct sway_view *view) { |