From 0427fddb5a919ae6b3a4205e057ae36133bfbc47 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sat, 8 Aug 2015 17:01:22 -0400 Subject: Add logging and new windows into layout tree --- sway/handlers.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'sway/handlers.c') 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; } -- cgit v1.2.3