diff options
author | Luminarys <kizunanohikari@gmail.com> | 2015-08-17 14:22:49 -0500 |
---|---|---|
committer | Luminarys <kizunanohikari@gmail.com> | 2015-08-17 14:22:49 -0500 |
commit | b5f19f0fd3c4f10ecee0993c45fa057d21b98778 (patch) | |
tree | e6f64e840b80c50c49047e96a4abda1bcf2a927f /sway | |
parent | 3b1bc2c11ed1073db5ac9299429a162d955878df (diff) |
View destroy handling clean up and clarifications
Diffstat (limited to 'sway')
-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 5c673697..4cd7d490 100644 --- a/sway/handlers.c +++ b/sway/handlers.c @@ -137,8 +137,10 @@ static void handle_view_destroyed(wlc_handle handle) { wlc_view_set_state(handle, WLC_BIT_ACTIVATED, true); sway_log(L_DEBUG,"Unmanaged window of type %x was destroyed", type); if (type & WLC_BIT_UNMANAGED) { + // We need to call focus_view() on focus_pointer because when unmanaged windows + // do not alter the focus structure of the container tree. This makes focus_pointer() + // think that it doesn't need to do anything, so we manually focus the result. focus_view(focus_pointer()); - arrange_windows(active_workspace, -1, -1); return; } @@ -147,11 +149,8 @@ static void handle_view_destroyed(wlc_handle handle) { focus_view(focus_pointer()); return; } - if (type & WLC_BIT_POPUP) { - swayc_t *view = get_swayc_for_handle(handle, &root_container); - destroy_view(view); - } } + swayc_t *view = get_swayc_for_handle(handle, &root_container); swayc_t *parent; swayc_t *focused = get_focused_container(&root_container); |