-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
input/cursor: don't send wl_pointer.motion event on pointer unlock warp #5431
input/cursor: don't send wl_pointer.motion event on pointer unlock warp #5431
Conversation
Hm, this writes into the internal seat state. I wonder if there's a better way to do this… |
Yeah, I'm not a huge fan of poking into wlroots like this either. The fundamental problem is we do seem to need to be able to change that state without notifying clients of motion events (for this and #5459, at least), but knowledge of that state existing breaks the abstraction (as far as I can tell, it's just there as an optimization to prevent sending duplicate motion events). Perhaps we could add |
+1 to |
These allow a compositor to do things like skip motion events on pointer constraint unlock, or not move the pointer during touch emulation. Refs swaywm/sway#5431, swaywm/sway#5459.
280669d
to
050c79e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It allows a compositor to do things like skip motion events on pointer constraint unlock. References: swaywm/sway#5431
050c79e
to
71cad7b
Compare
On warping to a cursor hint, update the pointer position we track as well, so that on the next pointer rebase we don't send an unexpected synthetic motion event to clients. Fixes swaywm#5405.
Thanks! |
On warping to a cursor hint, update the pointer position we track as well, so that on the next pointer rebase we don't send an unexpected synthetic motion event to clients.
Fixes #5405.
Refs https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/20, awaiting clarification on that end but figured I should bring up a patch for testing/review earlier. I don't have any games/applications that require this patch, so it hasn't been tested by me (hoping to get someone affected by the issue to give it a shot).
If the plan is to tag Sway 1.5 in the near-ish future, I think we should either (temporarily) revert 6ea4539 or apply something along the lines of this patch. The slight cosmetic improvement 6ea4539 provides (+ making clicks post-
swaymsg cursor move
click the right location) is probably not worth breaking applications that rely on not seeing a motion event post-unlock.(Tacking onto 1.5 milestone so that it doesn't get lost.)