Root: fix use of view.current before update

In commitTransaction() we currently the current view state to determine
whether or not to enable the view's scene tree. However we don't update
the view's current state until after that check.
This commit is contained in:
Isaac Freund 2023-03-01 19:03:16 +01:00
parent bf759c7c57
commit b1540e2d94
No known key found for this signature in database
GPG Key ID: 86DED400DDFD7A11

View File

@ -617,6 +617,8 @@ fn commitTransaction(root: *Self) void {
view.popup_tree.node.reparent(output.layers.popups);
}
view.updateCurrent();
const enabled = view.current.tags & output.current.tags != 0;
view.tree.node.setEnabled(enabled);
view.popup_tree.node.setEnabled(enabled);
@ -624,8 +626,6 @@ fn commitTransaction(root: *Self) void {
// TODO this approach for syncing the order will likely cause over-damaging.
view.tree.node.lowerToBottom();
}
view.updateCurrent();
}
if (output.inflight.fullscreen != output.current.fullscreen) {