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:
@ -178,9 +178,9 @@ pub fn inputAllowed(self: Self, wlr_surface: *wlr.Surface) bool {
|
||||
true;
|
||||
}
|
||||
|
||||
pub fn maybeResetCursorState(self: Self) void {
|
||||
pub fn updateCursorState(self: Self) void {
|
||||
var it = self.seats.first;
|
||||
while (it) |node| : (it = node.next) node.data.cursor.maybeResetState();
|
||||
while (it) |node| : (it = node.next) node.data.cursor.updateState();
|
||||
}
|
||||
|
||||
fn handleInhibitActivate(
|
||||
|
Reference in New Issue
Block a user