mirror of
https://github.com/swaywm/sway.git
synced 2025-11-10 13:29:51 -05:00
fixed segfault on exit + a little fixup of that floatfocus pr
This commit is contained in:
parent
0bf380a0b1
commit
225c2fbe5b
5 changed files with 24 additions and 17 deletions
|
|
@ -151,7 +151,9 @@ swayc_t *remove_child(swayc_t *child) {
|
|||
// Set focused to new container
|
||||
if (parent->focused == child) {
|
||||
if (parent->children->length > 0) {
|
||||
parent->focused = parent->children->items[i?i-1:0];
|
||||
parent->focused = parent->children->items[i ? i-1:0];
|
||||
} else if (parent->floating && parent->floating->length) {
|
||||
parent->focused = parent->floating->items[parent->floating->length - 1];
|
||||
} else {
|
||||
parent->focused = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue