diff options
Diffstat (limited to 'sway/handlers.c')
-rw-r--r-- | sway/handlers.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index f183c418..d2d8c5a0 100644 --- a/sway/handlers.c +++ b/sway/handlers.c @@ -27,6 +27,15 @@ void handle_output_resolution_change(wlc_handle output, const struct wlc_size *f arrange_windows(&root_container, -1, -1); } +void handle_output_focused(wlc_handle output, bool focus) { + swayc_t *c = get_swayc_for_handle(output, &root_container); + if (!c) return; + if (focus) { + unfocus_all(&root_container); + focus_view(c); + } +} + bool handle_view_created(wlc_handle view) { add_view(view); return true; |