Passing gtk widget address to gdk_window_set_user_data


Trying to implement a custom GtkContainer using gobject introspection.

I need to call gdk_window_set_user_data() for the exact reason
described in the documentation:

I'm doing this:

        self.window = Gdk.Window(self.get_parent_window(), attr, 0)

where "self" is an instance of a class deriving from Gtk.Container

However, the address received at the C level by
gdk_window_set_user_data() does not correspond to a GtkWidget. This
causes GTK+ to segfault later on. Presumably the address passed
corresponds to a pygobject-level encapsulation of the GtkWidget.

How can I get the "gtk address" of self to pass to this function?

Is this a bug in the bindings? (In PyGTK this "just worked").

Test app: (sorry its a bit messy)


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