Fix focused view sometimes being reported as having no tags
This commit is contained in:
		| @ -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), | ||||
|         } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user