Fix current view tags being wrong

This commit is contained in:
2025-10-09 15:36:11 -07:00
parent 52b312d08d
commit 7ce21a44d8

View File

@ -376,6 +376,7 @@ pub fn commitTransaction(view: *View) void {
} }
view.updateSceneState(); view.updateSceneState();
view.notifyState();
} }
pub fn updateSceneState(view: *View) void { pub fn updateSceneState(view: *View) void {
@ -780,14 +781,14 @@ pub fn notifyState(view: *const View) void {
if (view.foreign_toplevel_handle.wlr_handle) |wlr_handle| { if (view.foreign_toplevel_handle.wlr_handle) |wlr_handle| {
if (view.getTitle()) |title| wlr_handle.setTitle(title); if (view.getTitle()) |title| wlr_handle.setTitle(title);
} }
// Send title and tags to all status listeners attached to a seat which focuses this view // Send title to all status listeners attached to a seat which focuses this view
if (view.ext_foreign_toplevel_handle) |handle| { if (view.ext_foreign_toplevel_handle) |handle| {
handle.updateState(&.{ handle.updateState(&.{
.title = view.getTitle(), .title = view.getTitle(),
.app_id = view.getAppId(), .app_id = view.getAppId(),
}); });
} }
// Send title to all status listeners attached to a seat which focuses this view // Send title and tags to all status listeners attached to a seat which focuses this view
var seat_it = server.input_manager.seats.iterator(.forward); var seat_it = server.input_manager.seats.iterator(.forward);
while (seat_it.next()) |seat| { while (seat_it.next()) |seat| {
if (seat.focused == .view and seat.focused.view == view) { if (seat.focused == .view and seat.focused.view == view) {