(error-if-null GdkWindow "Could not create GdkWindow:" widget)
(set-glx-widget-xwindow! widget (C-call "gdk_window_xid" GdkWindow))
(C-call "gtk_widget_set_window" GtkWidget GdkWindow)
- (C-call "gdk_window_set_user_data" GdkWindow GtkWidget)
+ (C-call "gtk_widget_register_window" GtkWidget GdkWindow)
+ ;; gtk_widget_unregister_window (as well as gdk_window_destroy)
+ ;; are called by the default unrealize method.
(let ((alien (glx-widget-glxcontext widget)))
(C-call "glXCreateContext" alien xdisplay visinfo 0 1)
(error-if-null alien "Could not create GLXContext.")))))
(attributes (* GdkWindowAttr))
(attributes_mask gint))
-(extern void gdk_window_set_user_data
- (window (* GdkWindow))
- (user_data gpointer))
+;;GDK_AVAILABLE_IN_3_8
+(extern void gtk_widget_register_window
+ (widget (* GtkWidget))
+ (window (* GdkWindow)))
(enum (GDK_ALL_EVENTS_MASK))