[Wayland-bugs] [Bug 748951] popup menus are being displayed at wrong position

gtk+ (GNOME Bugzilla) bugzilla at gnome.org
Mon May 25 20:48:00 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=748951

Jonas Ådahl <jadahl at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jadahl at gmail.com

--- Comment #2 from Jonas Ådahl <jadahl at gmail.com> ---
So the issue seems to be that gtk+ Wayland backend will fail to calculate a
parent for popup menus not explicitly attached to a parent which happens if a
"transfer window" is used for the popup grab.

A possible work around is to call gtk_menu_attach_to_widget before
gtk_menu_popup, which avoids trying to find the parent via the grabbed device.
It seems to work with the reproduction case I have used (WebPopupMenuProxyGtk
in WebKit2, reproduced with any <select>...</select> form).

A proper solution I assume would be to rework how grabs are done in gtkmenu.c
as it seem to have various X11 related grab logics in there (the reason for
creating a transfer window being one?). An input only grab window in Wayland
would probably not make much sense, since a popup gets an explict grab when it
is created.

Maybe also we could enable the Wayland backend to find the transfer window
which has the device grab. The device would then find what window has the
pointer focus. We never map the transfer window, so it wouldn't be the focus
window, which might break some assumptions regarding that.

Another semi related issue is that the GtkMenu API allows arbitrary positioning
of the menu via the positioning callback. This is not the reason for the
displacement of this bug since the global positioning issue is "worked around"
in the Wayland backend.

Any opinions on what path I should take here? I'm not familiar with reasoning
behind the menu grab logic, and git blame tells me that part has not changed
since 2002.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-bugs/attachments/20150526/64974d93/attachment.html>


More information about the wayland-bugs mailing list