-
Notifications
You must be signed in to change notification settings - Fork 148
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
Smithay doesn't send leave events when surfaces/popups are destroyed #1257
Comments
bwidawsk
added a commit
to bwidawsk/smithay
that referenced
this issue
Dec 21, 2023
Wayland protocol indicates that a leave event must be generated before any subsequent enter event. WLCS (but true in general) have several tests where a popup is destroyed and it is expected to leave and re-enter the below surface. Half of the issue is addressed here, when a popup is explicitly destroyed the leave event will be generated, though the subsequent enter will not be generated until there is pointer motion. The enter event can be simulated within the compositor via a 0 length move event, but the leave event has no such workaround. This issue is potentially present for surfaces and subsurfaces as well, but WLCS doesn't seem to care (that I've yet seen) about those - so that's deferred until needed. Fixes Smithay#1257
bwidawsk
added a commit
to bwidawsk/smithay
that referenced
this issue
Dec 21, 2023
Wayland protocol indicates that a leave event must be generated before any subsequent enter event. WLCS (but true in general) have several tests where a popup is destroyed and it is expected to leave and re-enter the below surface. Half of the issue is addressed here, when a popup is explicitly destroyed the leave event will be generated, though the subsequent enter will not be generated until there is pointer motion. The enter event can be simulated within the compositor via a 0 length move event, but the leave event has no such workaround. This issue is potentially present for surfaces and subsurfaces as well, but WLCS doesn't seem to care (that I've yet seen) about those - so that's deferred until needed. Fixes Smithay#1257
bwidawsk
added a commit
to bwidawsk/smithay
that referenced
this issue
Dec 22, 2023
Wayland protocol indicates that a leave event must be generated before any subsequent enter event. WLCS (but true in general) have several tests where a popup is destroyed and it is expected to leave and re-enter the below surface. Half of the issue is addressed here, when a popup is explicitly destroyed the leave event will be generated, though the subsequent enter will not be generated until there is pointer motion. The enter event can be simulated within the compositor via a 0 length move event, but the leave event has no such workaround. This issue is potentially present for surfaces and subsurfaces as well, but WLCS doesn't seem to care (that I've yet seen) about those - so that's deferred until needed. Fixes Smithay#1257
bwidawsk
added a commit
to bwidawsk/smithay
that referenced
this issue
Jan 3, 2024
Wayland protocol indicates that a leave event must be generated before any subsequent enter event. WLCS (but true in general) have several tests where a popup is destroyed and it is expected to leave and re-enter the below surface. Half of the issue is addressed here, when a popup is explicitly destroyed the leave event will be generated, though the subsequent enter will not be generated until there is pointer motion. The enter event can be simulated within the compositor via a 0 length move event, but the leave event has no such workaround. This issue is potentially present for surfaces and subsurfaces as well, but WLCS doesn't seem to care (that I've yet seen) about those - so that's deferred until needed. Fixes Smithay#1257
bwidawsk
added a commit
to bwidawsk/smithay
that referenced
this issue
Jan 3, 2024
Wayland protocol indicates that a leave event must be generated before any subsequent enter event. WLCS (but true in general) have several tests where a popup is destroyed and it is expected to leave and re-enter the below surface. Half of the issue is addressed here, when a popup is explicitly destroyed the leave event will be generated, though the subsequent enter will not be generated until there is pointer motion. The enter event can be simulated within the compositor via a 0 length move event, but the leave event has no such workaround. This issue is potentially present for surfaces and subsurfaces as well, but WLCS doesn't seem to care (that I've yet seen) about those - so that's deferred until needed. Fixes Smithay#1257
It seems this is also true for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While slightly ambiguous, Wayland spec states:
This implies that if a surface had gained focus via
wl_pointer::enter
andwl_pointer::leave
must bookend this before the next enter. It is awkward with the surface being destroyed because there is no longer (potentially) a surface to send the event to. wlroots, and likely other compositors send the event to the NULL surface. Smithay should include this behavior.This issue was found with a popup in a WLCS test: XdgPopupStable/XdgPopupTest.popup_gives_up_pointer_focus_when_gone/0. The warning triggered is here
The text was updated successfully, but these errors were encountered: