mirror of
https://github.com/swaywm/sway.git
synced 2026-04-28 06:46:26 -04:00
handlers: Tiny rework of output_destroyed logic
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
parent
c7c2bf542a
commit
db8dacf76e
1 changed files with 7 additions and 4 deletions
|
|
@ -97,14 +97,17 @@ static void handle_output_destroyed(wlc_handle output) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (i < list->length) {
|
||||
destroy_output(list->items[i]);
|
||||
} else {
|
||||
if (i == list->length) {
|
||||
// No container for this output, we're done
|
||||
return;
|
||||
}
|
||||
|
||||
destroy_output(list->items[i]);
|
||||
|
||||
if (list->length > 0) {
|
||||
swayc_t *c = (swayc_t *)list->items[0];
|
||||
// switch to other outputs active workspace
|
||||
workspace_switch(((swayc_t *)root_container.children->items[0])->focused);
|
||||
workspace_switch(c->focused);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue