Skip to content
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

[RFC] wayland: reconfigure cursor on pointer enter event #6480

Closed
wants to merge 1 commit into from

Conversation

t-8ch
Copy link
Contributor

@t-8ch t-8ch commented Feb 4, 2019

On wayland the cursor has to be configured each time the pointer enters.
Currently if the window (re)gains the focus, the pointer is not hidden,
even when configured. After the mouse has been moved the pointer hides
correctly.

https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_pointer:

wl_pointer::enter - enter event

...

When a seat's focus enters a surface, the pointer image is undefined
and a client should respond to this event by setting an appropriate
pointer image with the set_cursor request.

Fixes #6185.

Signed-off-by: Thomas Weißschuh thomas@t-8ch.de
I agree that my changes can be relicensed to LGPL 2.1 or later.

On wayland the cursor has to be configured each time the pointer enters.
Currently if the window (re)gains the focus, the pointer is not hidden,
even when configured. After the mouse has been moved the pointer hides
correctly.

https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_pointer:

    wl_pointer::enter - enter event

    ...

    When a seat's focus enters a surface, the pointer image is undefined
    and a client should respond to this event by setting an appropriate
    pointer image with the set_cursor request.

Fixes mpv-player#6185.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
@t-8ch t-8ch changed the title wayland: reconfigure cursor on pointer enter event [RFC] wayland: reconfigure cursor on pointer enter event Feb 5, 2019
@t-8ch
Copy link
Contributor Author

t-8ch commented Feb 5, 2019

It should also be discussed, how to handle pointer enter events, while the hiding timer is active and how to handle the pointer configuration at startup.

@Dudemanguy
Copy link
Member

Nice. This is the one little thing about wayland mpv that has annoyed me for a while. Just one little inconsistency I noticed. With this PR, the cursor will reappear if you fullscreen a window in which it was hidden. This does not happen to me if I use the x11 backend. I don't think users should have their cursors reappear when entering fullscreen (only while leaving it), so matching the x11 behavior seems to be the correct approach to me.

@ghost
Copy link

ghost commented Sep 21, 2019

Obsoleted by the PR above.

@ghost ghost closed this Sep 21, 2019
@t-8ch t-8ch deleted the wayland-pointer-enter branch September 21, 2019 19:11
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gnome Wayland: mpv only hides the cursor if I move it
2 participants