Skip to content

Wayland: Fix stuck pointer buttons on window leave #106414

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Riteo
Copy link
Contributor

@Riteo Riteo commented May 14, 2025

Fixes #105908.
Fixes #106284.

This issue came from the frame-based refactoring done in the multiwin PR.

It looks like some (all?) compositors group certain events alongside wl_pointer::leave, which I absolutely did not expect. The docs don't seem to mention it either from what I can tell.

We now fall-back on the old pointed window if and only if the current window is invalid and the old one isn't. Each state fetch is guarded with an ERR_FAIL_NULL so this should still catch any potentially corrupted window with missing data but a valid ID.

I also added the usual big comment so that this "quirk" does not get lost to time.

This issue came from the frame-based refactoring done in the multiwin
PR.

It looks like some (all?) compositors group certain events alongside
`wl_pointer::leave`, which I absolutely did not expect. The docs don't
seem to mention it either from what I can tell.

We now fall-back on the old pointed window if and only if the current
window is invalid and the old one isn't. Each state fetch is guarded
with an `ERR_FAIL_NULL` so this should still catch any potentially
corrupted window with missing data but a valid ID.

I also added the usual big comment so that this "quirk" does not get
lost to time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Wayland] Delayed event.is_released() outside of game window Can't Use Scene Undo on Wayland After Having Opened a Context Menu
1 participant