Re: [gtk-list] signals part II




> ok, the expose_event from the last message does indeed work, however
> the button_press_event still doesn't :/......
> 
> what fundamental thing about GTK signals am I missing? :)

The expose event works because the parent widget has it in it's event
mask by default, and container widgets are responsible for propagating
expose_event signals. (But nothing else)

Maybe there should be a warning when gtk_widget_set_events is called
on a GTK_NO_WINDOW widget ... it is always a mistake.

Something like the following - what do people think? (Untested patch
warning!) Of course, it still wouldn't be transparent why the warning
was happening. But a FAQ entry could fix that.

                                        Owen

*** gtkwidget.c.save	Fri Aug  8 00:28:12 1997
--- gtkwidget.c	Fri Aug  8 00:29:41 1997
***************
*** 1723,1728 ****
--- 1723,1729 ----
    gint *eventp;
  
    g_return_if_fail (widget != NULL);
+   g_return_if_fail (GTK_WIDGET_NO_WINDOW (widget));
  
    eventp = gtk_object_get_data (GTK_OBJECT (widget), event_key);
  



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