This is the mail archive of the
guile-gtk@sources.redhat.com
mailing list for the Guile project.
Re: Completed GdkWindow; enhanced design
- From: Kevin Ryde <user42 at zip dot com dot au>
- To: Marko Rauhamaa <marko at pacujo dot net>
- Cc: guile-gtk at sources dot redhat dot com
- Date: Fri, 16 May 2003 09:18:58 +1000
- Subject: Re: Completed GdkWindow; enhanced design
- References: <m3r870fy1p.fsf@lumo.pacujo.net>
Marko Rauhamaa <marko@pacujo.net> writes:
>
> The GdkWindow user_data is either NULL (initially) or an SCM list.
> The first element of the list is the SCM user data (or #f). The
> remainder of the list consists of filter procedures.
>
> You will see that gdk_window_mark will simply return its user_data to
> protect it against GC.
Are you aware that gtk stores a widget (pointer) in the GdkWindow
user_data? So for instance you can't assume a window obtained from
gtk_widget_window will have an SCM in the user_data field.
The gtk 2 docs suggest one should store only NULL or a widget, because
the gtk event handler will expect that. The gtk 1.2 code looks like
gtk_main_do_event and gtk_get_event_widget don't attempt any
validation.
(Presumably this issue must have shown up when you tested your
changes, so I wonder if I've badly missed something.)