xdg_popup.grab has duplicated and contradictory parent requirements
In the description of xdg_popup.grab
we have the following:
The parent of a grabbing popup must either be an xdg_toplevel surface or another xdg_popup with an explicit grab. If the parent is another xdg_popup it means that the popups are nested, with this popup now being the topmost popup.
But later in the same description, we have this:
The parent of a grabbing popup must either be another xdg_popup with an active explicit grab, or an xdg_popup or xdg_toplevel, if there are no explicit grabs already taken.
These contradict on whether a parent xdg_popup
must be a grabbing popup.
I'm not sure which behaviour is intended. The first constraint - xdg_toplevel
or grabbing xdg_popup
covers what I expect grabbing popups to be used for, but perhaps the looser xdg_toplevel
or xdg_popup
(which must be the topmost grabbing popup if any grabs exist) is deliberate?
Alternatively, is this actually meant to be “if any grabbing xdg_popup
s exist, the parent must be the topmost grabbing popup. Otherwise, the parent must be an xdg_toplevel
”?