[Wayland-bugs] [Bug 768016] [Wayland] Submenus often get closed after ~2 seconds
gtk+ (GNOME Bugzilla)
bugzilla at gnome.org
Tue Jun 28 07:28:38 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=768016
--- Comment #4 from Olivier Fourdan <ofourdan at redhat.com> ---
I reckon it's a difference in the coordinates between X11 and Wayland.
If we look at gtk_menu_set_submenu_navigation_region():
https://git.gnome.org/browse/gtk+/tree/gtk/gtkmenu.c#n4185
which is called in both X11 and Wayland cases as soon as the pointer leaves the
first menu to enter the submenu, we see that the
gtk_menu_stop_navigating_submenu_cb() timeout is set when event->x >= 0 &&
event->x < width, width being the width of the window where the event is coming
from.
In the X11 case, we have the event->x slightly (couple of pixels) farther than
the actual left window width (e.g. x = 450, width = 448) which sounds right
because the pointer has left the previous item therefore it's outside the
window.
But in the Wayland case, we have the event x slightly less that the actual left
window width (e.g. x = 396, width = 408), and therfore we enter the case where
the timeout will be set up.
The Wayland case seems wrong, the event x should not be less than the width of
the window that was the pointer just left (otherwise it would not have left the
window, would we?).
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20160628/753bedda/attachment.html>
More information about the wayland-bugs
mailing list