mirror of
https://github.com/NickHu/sway
synced 2024-12-28 22:23:30 +01:00
Remove incorrect assertion and supporting code
Children can exist when destroying a container, such as when destroying the last output. Sway is not terminating in that case.
This commit is contained in:
parent
93696b78ec
commit
a7b3f29292
3 changed files with 0 additions and 12 deletions
|
@ -47,8 +47,6 @@ struct sway_server {
|
||||||
|
|
||||||
bool debug_txn_timings;
|
bool debug_txn_timings;
|
||||||
|
|
||||||
bool terminating;
|
|
||||||
|
|
||||||
struct sway_transaction *head_transaction; // singly linked list
|
struct sway_transaction *head_transaction; // singly linked list
|
||||||
|
|
||||||
// When a view is being destroyed and is waiting for a transaction to
|
// When a view is being destroyed and is waiting for a transaction to
|
||||||
|
|
|
@ -34,7 +34,6 @@ struct sway_server server;
|
||||||
void sway_terminate(int exit_code) {
|
void sway_terminate(int exit_code) {
|
||||||
terminate_request = true;
|
terminate_request = true;
|
||||||
exit_value = exit_code;
|
exit_value = exit_code;
|
||||||
server.terminating = true;
|
|
||||||
wl_display_terminate(server.wl_display);
|
wl_display_terminate(server.wl_display);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -319,15 +319,6 @@ struct sway_container *container_destroy_noreaping(struct sway_container *con) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// At this point the container being destroyed shouldn't have any children
|
|
||||||
// unless sway is terminating.
|
|
||||||
if (!server.terminating) {
|
|
||||||
if (!sway_assert(!con->children || con->children->length == 0,
|
|
||||||
"Didn't expect to see children here")) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
con->destroying = true;
|
con->destroying = true;
|
||||||
list_add(server.destroying_containers, con);
|
list_add(server.destroying_containers, con);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue