This is the mail archive of the guile-gtk@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Completed GdkWindow; enhanced design


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.)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]