From 014963612c0d65b96d7d9c5318784e1ee6acb9df Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Mon, 6 Jul 2020 11:09:23 +0200 Subject: [PATCH] river-status: fix bug sending old output tag state --- river/Root.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/river/Root.zig b/river/Root.zig index b93ed8a..95ab9db 100644 --- a/river/Root.zig +++ b/river/Root.zig @@ -214,7 +214,9 @@ fn commitTransaction(self: *Self) void { const output = &output_node.data; // Apply pending state of the output - if (output.pending.tags != output.current.tags) { + const output_tags_changed = output.pending.tags != output.current.tags; + output.current = output.pending; + if (output_tags_changed) { log.debug( .output, "changing current focus: {b:0>10} to {b:0>10}", @@ -223,7 +225,6 @@ fn commitTransaction(self: *Self) void { var it = output.status_trackers.first; while (it) |node| : (it = node.next) node.data.sendFocusedTags(); } - output.current = output.pending; var view_tags_changed = false;