aboutsummaryrefslogtreecommitdiff
path: root/sway/handlers.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/handlers.c')
-rw-r--r--sway/handlers.c9
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;
}