From 4f84a5f292ed40074a063427e99a623c71476e8c Mon Sep 17 00:00:00 2001 From: Cody Russell Date: Sun, 25 May 2008 23:27:34 +0000 Subject: [PATCH] Bug 526635 - _gdk_window_get_toplevel handles FOREIGN windows 2008-05-25 Cody Russell Bug 526635 - _gdk_window_get_toplevel handles FOREIGN windows * gdk/x11/gdkwindow-x11.c (_gdk_window_get_toplevel): Check !WINDOW_IS_TOPLEVEL instead of checking for GDK_WINDOW_CHILD, so that we also take into account for foreign windows. Report and patch by Nathaniel Smith. svn path=/trunk/; revision=20166 --- ChangeLog | 9 +++++++++ gdk/x11/gdkwindow-x11.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2fb4ab3c63..c2aca328be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-05-25 Cody Russell + + Bug 526635 - _gdk_window_get_toplevel handles FOREIGN windows + + * gdk/x11/gdkwindow-x11.c (_gdk_window_get_toplevel): Check + !WINDOW_IS_TOPLEVEL instead of checking for GDK_WINDOW_CHILD, + so that we also take into account for foreign windows. + Report and patch by Nathaniel Smith. + 2008-05-25 Cody Russell Bug 525461 - Don't invalidate under an input-only child diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index d5d7160ca0..56d5e20688 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -153,7 +153,7 @@ _gdk_x11_window_get_toplevel (GdkWindow *window) g_return_val_if_fail (GDK_IS_WINDOW (window), NULL); - if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_CHILD) + if (!WINDOW_IS_TOPLEVEL (window)) return NULL; private = (GdkWindowObject *)window;