mirror of
https://github.com/swaywm/sway.git
synced 2025-11-06 13:29:50 -05:00
Handle view destruction properly
This commit is contained in:
parent
a57d462926
commit
8caabe59c2
6 changed files with 73 additions and 2 deletions
|
|
@ -40,6 +40,19 @@ void add_child(swayc_t *parent, swayc_t *child) {
|
|||
*/
|
||||
}
|
||||
|
||||
swayc_t *remove_child(swayc_t *child) {
|
||||
int i;
|
||||
swayc_t *parent = child->parent;
|
||||
for (i = 0; i < parent->children->length; ++i) {
|
||||
if (parent->children->items[i] == child) {
|
||||
list_del(parent->children, i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
child->parent = NULL;
|
||||
return parent;
|
||||
}
|
||||
|
||||
enum swayc_layouts default_layout(swayc_t *output) {
|
||||
/* TODO WLR
|
||||
if (config->default_layout != L_NONE) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue