GNOME Bugzilla – Bug 65006
GtkCombo - dragging scrollbar in popup
Last modified: 2011-02-04 16:09:32 UTC
When dragging the vscrollbar in the GtkCombo popup, it stops scrolling the window if you move the mouse outside the vscrollbar. Also, it gets confused if you release the button outside the scrollbar. Looks like a grab/events problem.
Ugh, really nasty. The problem is that GtkRange (and a lot of other widgets) don't do explicit pointer grabs because they assume that an implicit pointer grab will take place on button press. But since the toplevel already has a pointer grab, the implicit pointer grab doesn't take place. Adding an explicit grab is no good, since then we'll steal the grab from GtkCombo and ungrab it. The best we can do is a gtk_grab_add() on the range widget in it's button press, and translate events to the range widget. Far from perfect, and definitely annoying. Basically, X grab semantics are far from good when it comes to how things should work inside a toolkit. I suspect that GTK+ should only ever grab the X pointer on toplevels with owner_events = FALSE, and implement everything else (preferably a unifiied gtk_grab_add(), gdk_pointer_grab() model) internally. A bit late for that now.
*** Bug 65464 has been marked as a duplicate of this bug. ***
Fri Mar 1 18:39:44 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkrange.c: Use an explicit gtk_grab_add() so that it works within the GtkList combo, where there is a owner_events = FALSE gdk_pointer_grab() already in effect. (#65006, reported by Damon Chaplin)