[676] in The GTK GIMP ToolKit mailing list archive
[gtk-list] Re: signals part II
daemon@ATHENA.MIT.EDU (Owen Taylor)
Fri Aug 8 00:32:53 1997
From: Owen Taylor <owt1@cornell.edu>
To: gtk-list@redhat.com
In-reply-to: Your message of "07 Aug 1997 21:10:29 PDT."
<m3d8nptive.fsf@pc-4374.bc.rogers.wave.ca>
Date: Fri, 08 Aug 1997 00:32:54 -0400
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
> 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);
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null