GNOME Bugzilla – Bug 152566
mouse events blocked over other widgets by closing of GtkComboBox popup window
Last modified: 2018-02-10 03:24:05 UTC
GtkCombo,GtkComboBox and maybe even menus, with the interaction between those widgets and GtkButtons. The bug specifically happens when you click on a the down arrow in a combobox to drop its menu down. Then move the mouse off the button and over another Gtkbutton without doing any clicking. Finally, with the mouse positioned over another button, not the arrow button of the combobox, try to clicking on the button. In win32 it does not send a clicked event indicating the button widget never recieved any mouse activity. Visibly, it appears the widget never recieved a focus event as it does not highlight as it would had I moved the mouse over the widget under normal conditions.
As I said in bug #137551 I think the problem here is that gdk_pointer_grab and gdk_display_pointer_ungrab in gdk/win32/gdkevents-win32.c do not generate GDK_ENTER_NOTIFY/GDK_LEAVE_NOTIFY as they should. There are even comments hinting at this in those functions: /* FIXME: Generate GDK_CROSSING_GRAB events */
Created attachment 31811 [details] [review] implements GDK_CROSING_GRAB/UNGRAB I've created a patch that implements what I understand to be a GDK_CROSSING_GRAB/UNGRAB event pair; the sending of a GDK_ENTER_NOTIFY on the grab and the sending of a GDK_LEAVE_NOTIFY on the ungrab. this seems to fix the grab problems with GtkComboBox and GtkCombo.
Not theat I'm an expert in this, but shouldn't there be event->crossing.mode = GDK_CROSSING_GRAB some where in the patch ?
I was under the impression that a GDK_CROSSING_GRAB is defined by sending a GDK_ENTER_NOTIFY event and GDK_LEAVE_NOTIFY event to each window. I could be wrong, it has been a while since I wrote this patch. I believe GDK_CROSSING_GRAB is not a macro and just a concept.
GDK_CROSSING_GRAB is one value in the enum GdkCrossingMode.
"Not theat I'm an expert in this, but shouldn't there be event->crossing.mode = GDK_CROSSING_GRAB some where in the patch ?" Ok, you are correct. I did not understand your question the first time. So, does this patch seem correct if we add a line event->crossing.mode = GDK_CROSSING_GRAB; before the the line: append_event( gdk_display_get_default(), event ); ?
Patch doesn't apply cleanly. Reviewing it would take little time. (Working on http://mail.gnome.org/archives/gtk-devel-list/2007-March/msg00148.html)
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue for it.