cursor: reset state if needed on transaction commit

A transaction may move the current target of a cursor action to a
non-visible tag, make it fullscreen, or otherwise change things such
that the current cursor state no longer makes sense.

To handle this, check if we should reset cursor state every time a
transaction is committed.
This commit is contained in:
Leon Henrik Plickat
2021-06-23 15:56:38 +02:00
committed by Isaac Freund
parent b7d330c0da
commit a3c6571326
3 changed files with 41 additions and 0 deletions

View File

@ -405,6 +405,11 @@ fn commitTransaction(self: *Self) void {
output.damage.addWhole();
}
var seat_it = server.input_manager.seats.first;
while (seat_it) |seat_node| : (seat_it = seat_node.next) {
seat_node.data.cursor.maybeResetState();
}
}
/// Send the new output configuration to all wlr-output-manager clients