From 82613a56db0633c9985c2f05b6f83b62d974af5f Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Thu, 9 Oct 2025 16:05:23 -0700 Subject: [PATCH] Fix focused view sometimes being reported as having no tags --- river/SeatStatus.zig | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/river/SeatStatus.zig b/river/SeatStatus.zig index 9bcd4ac..07debbb 100644 --- a/river/SeatStatus.zig +++ b/river/SeatStatus.zig @@ -81,8 +81,12 @@ pub fn sendFocusedView(seat_status: SeatStatus) void { if (seat_status.seat_status_v1.getVersion() >= 4) { switch (seat_status.seat.focused) { .view => |view| { - //assert(view.inflight.tags == view.current.tags); - seat_status.seat_status_v1.sendFocusedView(view.getTitle() orelse "", view.current.tags); + if (view.current.tags != 0) { + // A view can't be on no tags, so we need to wait for the + // layout to update. There is probably a better way to do + // this, but this way seems to work. + seat_status.seat_status_v1.sendFocusedView(view.getTitle() orelse "", view.current.tags); + } }, else => seat_status.seat_status_v1.sendFocusedView("", 0), }