diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-08-08 17:01:22 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-08-08 17:01:27 -0400 |
commit | 0427fddb5a919ae6b3a4205e057ae36133bfbc47 (patch) | |
tree | bf4e163872f63ad955148907f4ce03b63ed5384c /sway/handlers.c | |
parent | 2786fa2215bf6d66a7e4feea4e7e12b0dc8d4ba4 (diff) |
Add logging and new windows into layout tree
Diffstat (limited to 'sway/handlers.c')
-rw-r--r-- | sway/handlers.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index 9addc847..af33f785 100644 --- a/sway/handlers.c +++ b/sway/handlers.c @@ -17,18 +17,17 @@ void handle_output_resolution_change(wlc_handle output, const struct wlc_size *f } bool handle_view_created(wlc_handle view) { - printf("View created, focusing"); - wlc_view_focus(view); - wlc_view_bring_to_front(view); + add_view(view); return true; } void handle_view_destroyed(wlc_handle view) { - printf("View destroyed"); - wlc_view_focus(get_topmost(wlc_view_get_output(view), 0)); + destroy_view(view); return true; } void handle_view_focus(wlc_handle view, bool focus) { + printf("View focused\n"); wlc_view_set_state(view, WLC_BIT_ACTIVATED, focus); + focused_view = view; } |