GNOME Bugzilla – Bug 603250
[Regression] ComboBox choices disappear when mouse button released (gtk+-2.18.3)
Last modified: 2018-02-10 03:39:37 UTC
I have been experiencing intermittent combobox problems using gtk+-2.18.3 on Windows XP. Sometimes (rarely) the click/release on the combobox works as expected (choices remain displayed). Other times the choices are displayed and immediately disappear when the mouse button is released. Test program source: http://www.cinterviews.com/2009/11/gtkcombobox-gtk-widgets.html Everything works fine when I revert to gtk+2.16.6 Any help would be greatly appreciated.
Created attachment 149243 [details] Test case from link above
The problem is related to where one clicks the combo box. If one clicks close to the left or right border, the menu stays up, reliably. Investigating...
The problem is related to the lack of synthesized enter and leave events when grabbing and ungrabbing the pointer, I think. I spent some hours trying out some fix but didn't arrive at any good solution. I got the combo box menu to stay up after clicking, but then the highlighting of menu items when moving the mouse over them didn't happen. (What I tried was to call synthesize_enter_or_leave_event() in _gdk_windowing_pointer_grab() in gdkevents-win32.c. Stashed diff available on request if somebody else is interested.) For now, users will just have to get used to keep the mouse button down when using combo boxes.
*** Bug 606709 has been marked as a duplicate of this bug. ***
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.