mirror of
https://github.com/swaywm/sway.git
synced 2026-04-03 07:15:39 -04:00
tree/node: Do not mark destroying nodes as dirty
Node destruction currently runs through the transaction system such that a particular node is only destroyed after its use in an ongoing transaction. If a node is dirtied after the node is marked as destroying but before it is destroyed, the pointer added to dirty_nodes would become a dangling pointer once the node was destroyed. Do not dirty destroying nodes, and ensure that destroying is only set after the last dirty.
This commit is contained in:
parent
14fbe9242f
commit
357d341f8f
4 changed files with 4 additions and 4 deletions
|
|
@ -301,8 +301,8 @@ void output_begin_destroy(struct sway_output *output) {
|
|||
sway_log(SWAY_DEBUG, "Destroying output '%s'", output->wlr_output->name);
|
||||
wl_signal_emit_mutable(&output->node.events.destroy, &output->node);
|
||||
|
||||
output->node.destroying = true;
|
||||
node_set_dirty(&output->node);
|
||||
output->node.destroying = true;
|
||||
}
|
||||
|
||||
struct sway_output *output_from_wlr_output(struct wlr_output *output) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue