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)
This commit is contained in:
Owen Taylor
2002-12-15 03:28:44 +00:00
committed by Owen Taylor
parent aeb608afec
commit 880f14ff0c
7 changed files with 55 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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