output: fix debug log on tag change

This commit is contained in:
Isaac Freund
2021-07-27 14:45:38 +02:00
parent 90008cfa53
commit 9e70fb25a5
2 changed files with 6 additions and 8 deletions

View File

@ -368,16 +368,15 @@ fn commitTransaction(self: *Self) void {
const output = &output_node.data;
// Apply pending state of the output
const output_tags_changed = output.pending.tags != output.current.tags;
output.current = output.pending;
if (output_tags_changed) {
if (output.pending.tags != output.current.tags) {
std.log.scoped(.output).debug(
"changing current focus: {b:0>10} to {b:0>10}",
.{ output.current.tags, output.pending.tags },
);
var it = output.status_trackers.first;
while (it) |node| : (it = node.next) node.data.sendFocusedTags();
while (it) |node| : (it = node.next) node.data.sendFocusedTags(output.pending.tags);
}
output.current = output.pending;
var view_tags_changed = false;