summaryrefslogtreecommitdiff
path: root/gtk/gtkinvisible.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2006-05-25 05:30:14 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-05-25 05:30:14 +0000
commit02ed1e9bdbe51c799dcee95485a621179466a401 (patch)
treeb80ca73fd3011fe64053dc19dcca30f11202c7ac /gtk/gtkinvisible.c
parent685d8ecfce09dbfb8e56eb08d1995e2e31a6e83f (diff)
downloadgtk+-02ed1e9bdbe51c799dcee95485a621179466a401.tar.gz
Make GTK+ work as an untrusted X client. (#136571, Ed Catmur)
2006-05-25 Matthias Clasen <mclasen@redhat.com> Make GTK+ work as an untrusted X client. (#136571, Ed Catmur)
Diffstat (limited to 'gtk/gtkinvisible.c')
-rw-r--r--gtk/gtkinvisible.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk/gtkinvisible.c b/gtk/gtkinvisible.c
index 3cf3a2ae9f..c944b770be 100644
--- a/gtk/gtkinvisible.c
+++ b/gtk/gtkinvisible.c
@@ -214,11 +214,16 @@ gtk_invisible_get_screen (GtkInvisible *invisible)
static void
gtk_invisible_realize (GtkWidget *widget)
{
+ GdkWindow *parent;
GdkWindowAttr attributes;
gint attributes_mask;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ parent = gtk_widget_get_parent_window (widget);
+ if (parent == NULL)
+ parent = gtk_widget_get_root_window (widget);
+
attributes.x = -100;
attributes.y = -100;
attributes.width = 10;
@@ -230,8 +235,7 @@ gtk_invisible_realize (GtkWidget *widget)
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_NOREDIR;
- widget->window = gdk_window_new (gtk_widget_get_root_window (widget),
- &attributes, attributes_mask);
+ widget->window = gdk_window_new (parent, &attributes, attributes_mask);
gdk_window_set_user_data (widget->window, widget);