GNOME Bugzilla – Bug 327379
Selection bug with some widgets
Last modified: 2006-06-10 08:32:41 UTC
This is a complicated bug. Reproduce: o Create a widnow with a child 3x3 table o Add a widget to the top-left corner o Add a GtkFixed or GtkComboBoxEntry directly under the other widget. o Click on the combo-box-entry o Click again on the combo-box-entry Notice that every second click selects the top-left widget of the GtkTable instead of the combo-box-entry. The problem here (from what I understand) is that every second time the widget gets clicked (i.e. the time that we dont set the selection, the time that we're supposed to forward the click to the actual object) glade_widget_button_press() gets called twice instead of once; the first time it gets called; glade_widget_retrieve_from_position () returns the correct gwidget and the second time it gets the wrong one. from a closer look; it seems that glade_widget_button_press() was called for an input only window created on the widget's behalf; gtk_widget_translate_coordinates (); doesnt seem to like this; the offset of the combo-box-entry inside the GtkTable is "dropped" and the event->[x,y] are then calculated from the GtkTable's origin instead. This is a bug I was trying to fix (after implementing GtkFixed) and never filed 'cause I though I'd just fix it and move on... still havent fixed this sucker :-/
The problem ended up being that events unhandled by one runtime glade widget, were passed down to the next; even if they are not GTK_NO_WINDOW. In the event handler we were just calculating the coordinated based on the widget the "event" signal was emitted on, by using gdk_window_get_user_data () to obtain the proper event widget for every event handled, this bug is fixed. whew, that was a tough one... closing, fixed in cvs.