gtk 3 stuck menu bug on Mac
I am currently investigating a menu handling bug of Gtk 3.22.26 on Mac (Quartz
implementation). It happens quite often that Gtk 3 menus on Mac stop
processing any mouse events. So when that happens, i.e. menu items are no more
highlighted when moving the mouse pointer over them, nor do the menu items fire
when being clicked, nor does i.e. a submenu close when moving the pointer over
another toplevel menu node. The menu simply remains stuck at this point.
Has somebody looked into this issue before?
What I found out so far is that whenever this problem occurs, both of the
following two checks in function gtk_menu_motion_notify() (gtkmenu.c) return
false and the function is thus aborted at this point:
menu_item = gtk_get_event_widget ((GdkEvent*) event);
if (!GTK_IS_MENU_ITEM (menu_item) ||
So it seems when this misbehavior occurs, a wrong toplevel widget was assigned
to the gdk event object (exactly: event->any.window->user_data). However so
far I don't know the root cause yet.
What looks suspicous to me though is that in gdkevents-quartz.c the toplevel
widget under the pointer coordinates is resolved before the corresponding gdk
event is pushed into the gdk event queue. I mean if this Quartz implementation
pushes a bunch of mouse events into the gdk event queue, and one of the events
i.e. would cause a new menu to popup (which always happens after pulling the
events from the queue), then the previously resolved toplevel widget (in
gdkevents-quartz.c) could be wrong since it resolved widgets in the past.
gtk-devel-list mailing list