Fix current view tags status

This commit is contained in:
Alexander Rosenberg 2024-05-15 19:20:48 -07:00
parent 929db0098a
commit 930dcb7dcd
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730
2 changed files with 10 additions and 3 deletions

View File

@ -718,7 +718,10 @@ fn commitTransaction(root: *Root) void {
{
var it = server.input_manager.seats.first;
while (it) |node| : (it = node.next) node.data.cursor.updateState();
while (it) |node| : (it = node.next) {
node.data.cursor.updateState();
node.data.sendFocusedView();
}
}
{

View File

@ -220,6 +220,11 @@ pub fn focus(seat: *Seat, _target: ?*View) void {
}
}
pub fn sendFocusedView(seat: *Seat) void {
var it = seat.status_trackers.first;
while (it) |node| : (it = node.next) node.data.sendFocusedView();
}
/// Switch focus to the target, handling unfocus and input inhibition
/// properly. This should only be called directly if dealing with layers or
/// override redirect xwayland views.
@ -288,8 +293,7 @@ pub fn setFocusRaw(seat: *Seat, new_focus: FocusTarget) void {
seat.cursor.may_need_warp = true;
// Inform any clients tracking status of the change
var it = seat.status_trackers.first;
while (it) |node| : (it = node.next) node.data.sendFocusedView();
seat.sendFocusedView();
}
/// Send keyboard enter/leave events and handle pointer constraints