Repeat: Clicking on widgets - consistency question



Hi all.  I am trying to find out under what circumstances a mouse button
press on a widget is supposed to be reported.  I am placing a number of
different widgets on the screen, and then pressing the various mouse
buttons on them to see which events are reported, and get some pretty
inconsistent results. Perhaps you can enlighten me on what I am supposed
to see.  I have seen 3 different responses to the "button_press_event"
event

Type 1:  On a type 1 widget, the widget gets the button press, and my
callback runs normally.  No other widget gets the press event.  Example:
GtkButton with a GtkFixed parent.

Type 2:  The widget gets the button press event, but so does the
widget's parent.  This is not affected by stacking, as I can stack two
type 2 widgets as siblings, and only the clicked widget and its parent
get the event.  Example: GtkEntry with a GtkFixed parent.

Type 3:  No widget gets the button press.  It is ignored by all widgets,
even if the widget's parent is the same parent that got the event in the
Type 2 case.  Example: GtkCheckButton with a GtkFixed parent.

All mouse buttons behave the same.

I believe that all widgets should be Type 1 widgets.  Is there a
compelling reason why they are not?

Andrew



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]