diff options
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 5c673697..4cd7d490 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -137,8 +137,10 @@ static void handle_view_destroyed(wlc_handle handle) { | |||
137 | wlc_view_set_state(handle, WLC_BIT_ACTIVATED, true); | 137 | wlc_view_set_state(handle, WLC_BIT_ACTIVATED, true); |
138 | sway_log(L_DEBUG,"Unmanaged window of type %x was destroyed", type); | 138 | sway_log(L_DEBUG,"Unmanaged window of type %x was destroyed", type); |
139 | if (type & WLC_BIT_UNMANAGED) { | 139 | if (type & WLC_BIT_UNMANAGED) { |
140 | // We need to call focus_view() on focus_pointer because when unmanaged windows | ||
141 | // do not alter the focus structure of the container tree. This makes focus_pointer() | ||
142 | // think that it doesn't need to do anything, so we manually focus the result. | ||
140 | focus_view(focus_pointer()); | 143 | focus_view(focus_pointer()); |
141 | arrange_windows(active_workspace, -1, -1); | ||
142 | return; | 144 | return; |
143 | } | 145 | } |
144 | 146 | ||
@@ -147,11 +149,8 @@ static void handle_view_destroyed(wlc_handle handle) { | |||
147 | focus_view(focus_pointer()); | 149 | focus_view(focus_pointer()); |
148 | return; | 150 | return; |
149 | } | 151 | } |
150 | if (type & WLC_BIT_POPUP) { | ||
151 | swayc_t *view = get_swayc_for_handle(handle, &root_container); | ||
152 | destroy_view(view); | ||
153 | } | ||
154 | } | 152 | } |
153 | |||
155 | swayc_t *view = get_swayc_for_handle(handle, &root_container); | 154 | swayc_t *view = get_swayc_for_handle(handle, &root_container); |
156 | swayc_t *parent; | 155 | swayc_t *parent; |
157 | swayc_t *focused = get_focused_container(&root_container); | 156 | swayc_t *focused = get_focused_container(&root_container); |