diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-08-10 23:54:23 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-08-10 23:54:23 -0400 |
commit | 96d7ff1e19c1e6af47f21764ed613c5ebe53a557 (patch) | |
tree | 75566e3fb44600e63c1dbbec3f216425a57e70a6 /sway/handlers.c | |
parent | dd115cece3490a2d1791880cd45fae4b274a123a (diff) |
Slightly better multihead support
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; |