summaryrefslogtreecommitdiffstats
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, 1 insertions, 8 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index 4d1dc56c..758af8d6 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -231,14 +231,7 @@ static void handle_view_destroyed(wlc_handle handle) {
231 break; 231 break;
232 } 232 }
233 233
234 swayc_t *focused_view = get_focused_view(&root_container); 234 set_focused_container(get_focused_view(&root_container));
235 if (focused_view->type == C_WORKSPACE && focused_view->children->length == 0) {
236 if (focused_view->floating->length > 0) {
237 focused_view = focused_view->floating->items[focused_view->floating->length-1];
238 focused_view = get_focused_view(focused_view);
239 }
240 }
241 set_focused_container(focused_view);
242} 235}
243 236
244static void handle_view_focus(wlc_handle view, bool focus) { 237static void handle_view_focus(wlc_handle view, bool focus) {