]> Pileus Git - ~andy/gtk/commitdiff
Fix a bug with checking the private flag on the wrong window; improve the
authorOwen Taylor <otaylor@redhat.com>
Sun, 15 Dec 2002 03:28:44 +0000 (03:28 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Sun, 15 Dec 2002 03:28:44 +0000 (03:28 +0000)
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)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/x11/gdkwindow-x11.c

index 3babe4d2123aef24f7f3f364528e7927f0f1c793..428ef8a5ed58a72bcbfaf402044577d3e838226e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 3babe4d2123aef24f7f3f364528e7927f0f1c793..428ef8a5ed58a72bcbfaf402044577d3e838226e 100644 (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
index 3babe4d2123aef24f7f3f364528e7927f0f1c793..428ef8a5ed58a72bcbfaf402044577d3e838226e 100644 (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
index 3babe4d2123aef24f7f3f364528e7927f0f1c793..428ef8a5ed58a72bcbfaf402044577d3e838226e 100644 (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
index 3babe4d2123aef24f7f3f364528e7927f0f1c793..428ef8a5ed58a72bcbfaf402044577d3e838226e 100644 (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
index 3babe4d2123aef24f7f3f364528e7927f0f1c793..428ef8a5ed58a72bcbfaf402044577d3e838226e 100644 (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
index aa100a7a0a46eb070d0134fb16b3a59ea45f3a4a..af81abfe754425544bf82e9b09c9e35d8638de37 100644 (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