cursor: avoid sending unnecessary pointer motion events

If the current Cursor.maybeResetState() function is called while in
passthrough mode, it will send a pointer motion event. This is
unnecessary as we have already sent the same pointer motion event at
least once.

Also refactor the code slightly and improve naming.
This commit is contained in:
Isaac Freund
2021-07-23 19:18:49 +02:00
parent b243cd7fc3
commit 53dd3875b3
4 changed files with 24 additions and 27 deletions

View File

@ -405,7 +405,7 @@ fn commitTransaction(self: *Self) void {
output.damage.addWhole();
}
server.input_manager.maybeResetCursorState();
server.input_manager.updateCursorState();
}
/// Send the new output configuration to all wlr-output-manager clients