diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-12-15 03:28:44 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-12-15 03:28:44 +0000 |
commit | 880f14ff0cf507e079ab735c7bcb32e2922b8de7 (patch) | |
tree | c74734f7d1a91ceb7e55614eba4a14054ef7bd0f | |
parent | aeb608afeccb71b6d649b4560c28a580e7f50353 (diff) | |
download | gtk+-880f14ff0cf507e079ab735c7bcb32e2922b8de7.tar.gz |
Fix a bug with checking the private flag on the wrong window; improve the
Sat Dec 14 22:18:45 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents):
Fix a bug with checking the private flag on the wrong
window; improve the answer on failure a bit; push
an error trap around the X operations. (#100933)
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 7 | ||||
-rw-r--r-- | gdk/x11/gdkwindow-x11.c | 15 |
7 files changed, 55 insertions, 2 deletions
@@ -1,3 +1,10 @@ +Sat Dec 14 22:18:45 2002 Owen Taylor <otaylor@redhat.com> + + * gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents): + Fix a bug with checking the private flag on the wrong + window; improve the answer on failure a bit; push + an error trap around the X operations. (#100933) + Sat Dec 14 22:03:21 2002 Owen Taylor <otaylor@redhat.com> * modules/input/gtkimcontextxim.c (status_window_hide): Don't diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 3babe4d212..428ef8a5ed 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Sat Dec 14 22:18:45 2002 Owen Taylor <otaylor@redhat.com> + + * gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents): + Fix a bug with checking the private flag on the wrong + window; improve the answer on failure a bit; push + an error trap around the X operations. (#100933) + Sat Dec 14 22:03:21 2002 Owen Taylor <otaylor@redhat.com> * modules/input/gtkimcontextxim.c (status_window_hide): Don't diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 3babe4d212..428ef8a5ed 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +Sat Dec 14 22:18:45 2002 Owen Taylor <otaylor@redhat.com> + + * gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents): + Fix a bug with checking the private flag on the wrong + window; improve the answer on failure a bit; push + an error trap around the X operations. (#100933) + Sat Dec 14 22:03:21 2002 Owen Taylor <otaylor@redhat.com> * modules/input/gtkimcontextxim.c (status_window_hide): Don't diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 3babe4d212..428ef8a5ed 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +Sat Dec 14 22:18:45 2002 Owen Taylor <otaylor@redhat.com> + + * gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents): + Fix a bug with checking the private flag on the wrong + window; improve the answer on failure a bit; push + an error trap around the X operations. (#100933) + Sat Dec 14 22:03:21 2002 Owen Taylor <otaylor@redhat.com> * modules/input/gtkimcontextxim.c (status_window_hide): Don't diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 3babe4d212..428ef8a5ed 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Sat Dec 14 22:18:45 2002 Owen Taylor <otaylor@redhat.com> + + * gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents): + Fix a bug with checking the private flag on the wrong + window; improve the answer on failure a bit; push + an error trap around the X operations. (#100933) + Sat Dec 14 22:03:21 2002 Owen Taylor <otaylor@redhat.com> * modules/input/gtkimcontextxim.c (status_window_hide): Don't diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 3babe4d212..428ef8a5ed 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Sat Dec 14 22:18:45 2002 Owen Taylor <otaylor@redhat.com> + + * gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents): + Fix a bug with checking the private flag on the wrong + window; improve the answer on failure a bit; push + an error trap around the X operations. (#100933) + Sat Dec 14 22:03:21 2002 Owen Taylor <otaylor@redhat.com> * modules/input/gtkimcontextxim.c (status_window_hide): Don't diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index aa100a7a0a..af81abfe75 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -2633,8 +2633,16 @@ gdk_window_get_frame_extents (GdkWindow *window, while (private->parent && ((GdkWindowObject*) private->parent)->parent) private = (GdkWindowObject*) private->parent; - if (GDK_WINDOW_DESTROYED (window)) + + /* Refine our fallback answer a bit using local information */ + rect->x = private->x; + rect->y = private->y; + gdk_drawable_get_size ((GdkDrawable *)private, &rect->width, &rect->height); + + if (GDK_WINDOW_DESTROYED (private)) return; + + gdk_error_trap_push(); xparent = GDK_WINDOW_XID (window); do @@ -2643,7 +2651,7 @@ gdk_window_get_frame_extents (GdkWindow *window, if (!XQueryTree (GDK_WINDOW_XDISPLAY (window), xwindow, &root, &xparent, &children, &nchildren)) - return; + goto fail; if (children) XFree (children); @@ -2663,6 +2671,9 @@ gdk_window_get_frame_extents (GdkWindow *window, rect->height = wh; } } + + fail: + gdk_error_trap_pop (); } void |