input: always update the xcursor shape in pointer enter/motion events

Now that term_xcursor_update_for_seat() takes the current surface into
account (i.e. doesn’t assume the cursor is over the main grid),
there’s no longer any need to call render_xcursor_set() directly.

Thus, we can simply call term_xcursor_update_for_seat() on **all**
pointer enter and motion events. As long as we take care to update the
internal state to reflect the, possibly new, current surface before
doing so.

Also make sure to **always** reset the seat’s “current” xcursor
pointer on pointer leave events. This is done without actually sending
anything to the compositor, but is necessary to ensure that we *do*
send a request to update the xcursor on the next pointer enter event.
This commit is contained in:
Daniel Eklöf 2021-12-01 20:04:01 +01:00
parent 63e8b1b292
commit 1619e83c13
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 11 additions and 15 deletions

View file

@ -61,6 +61,7 @@
* CSD border not being dimmed when window is not focused.
* Visual corruption with large CSD borders
(https://codeberg.org/dnkl/foot/issues/823).
* Mouse cursor shape sometimes not being updated correctly.
### Security