After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 327379 - Selection bug with some widgets
Selection bug with some widgets
Status: RESOLVED FIXED
Product: glade
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Glade 3 Maintainers
Glade 3 Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-01-17 17:37 UTC by Tristan Van Berkom
Modified: 2006-06-10 08:32 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tristan Van Berkom 2006-01-17 17:37:26 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 :-/
Comment 1 Tristan Van Berkom 2006-06-10 08:32:41 UTC
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.