summaryrefslogtreecommitdiff
path: root/gtk/gtksocket.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtksocket.c')
-rw-r--r--gtk/gtksocket.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk/gtksocket.c b/gtk/gtksocket.c
index 28ffe4dce..91bd47ec1 100644
--- a/gtk/gtksocket.c
+++ b/gtk/gtksocket.c
@@ -150,14 +150,19 @@ void
gtk_socket_steal (GtkSocket *socket, GdkNativeWindow id)
{
GtkWidget *widget;
-
+ gpointer user_data = NULL;
+
widget = GTK_WIDGET (socket);
socket->plug_window = gdk_window_lookup (id);
gdk_error_trap_push ();
+
+ if (socket->plug_window)
+ gdk_window_get_user_data (socket->plug_window,
+ &user_data);
- if (socket->plug_window && socket->plug_window->user_data)
+ if (user_data)
{
/*
GtkWidget *child_widget;