mirror of
https://github.com/swaywm/sway.git
synced 2024-11-26 18:01:29 +00:00
Focus floating window, if any, when the last tiling has been closed
This commit is contained in:
parent
2e755cf13f
commit
7a1c36716a
|
@ -227,7 +227,17 @@ static void handle_view_destroyed(wlc_handle handle) {
|
||||||
locked_container_focus = false;
|
locked_container_focus = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
set_focused_container(get_focused_view(&root_container));
|
|
||||||
|
swayc_t *focused_view = get_focused_view(&root_container);
|
||||||
|
if(focused_view->type == C_WORKSPACE && focused_view->children->length == 0){
|
||||||
|
sway_log(L_DEBUG, "we are here first");
|
||||||
|
if(focused_view->floating->length > 0){
|
||||||
|
sway_log(L_DEBUG, "we are here %d", focused_view->floating->length);
|
||||||
|
focused_view = focused_view->floating->items[focused_view->floating->length-1];
|
||||||
|
focused_view = get_focused_view(focused_view);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set_focused_container(focused_view);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_view_focus(wlc_handle view, bool focus) {
|
static void handle_view_focus(wlc_handle view, bool focus) {
|
||||||
|
|
Loading…
Reference in a new issue