Weird pointer focus behaviour with `xdg_popup.grab`
The xdg-shell
specification says the following about xdg_popup.grab
:
During a popup grab, the client owning the grab will receive pointer and touch events for all their surfaces as normal (similar to an "owner-events" grab in X11 parlance), while the top most grabbing popup will always have keyboard focus.
However, I observed the following behaviour in Weston 11.0.0 when pressing the left mouse button while over a surface, in response to which an xdg_popup
is created and its grab
request is called, and then the mouse is dragged over the popup and released again:
- the pointer focus leaves and then almost immediately re-enters the parent surface
- as soon as the mouse is dragged above the popup, the pointer focus switches to the popup surface
- when the mouse button is released, the appropriate
wl_pointer.button
event is emitted
In my understanding of the specification, I would have expected the following behaviour instead:
- the pointer focus remains with the parent surface (no leaving and re-entering)
- when the mouse button is released, the appropriate
wl_pointer.button
event is emitted - the pointer focus switches to the popup surface