aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Freund <mail@isaacfreund.com>2023-03-01 19:03:16 +0100
committerIsaac Freund <mail@isaacfreund.com>2023-03-01 19:03:16 +0100
commitb1540e2d94c4dd99b88b53a225be3bddf285830d (patch)
tree922b31a45bbe75b67efc47a43b9ae816f7778086
parentbf759c7c57762d09d9b59fa2fa048c8c1bdf969e (diff)
downloadriver-b1540e2d94c4dd99b88b53a225be3bddf285830d.tar.gz
river-b1540e2d94c4dd99b88b53a225be3bddf285830d.tar.xz
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.
-rw-r--r--river/Root.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/river/Root.zig b/river/Root.zig
index c86822e..9fb516f 100644
--- a/river/Root.zig
+++ b/river/Root.zig
@@ -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) {