diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2008-06-06 20:57:50 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2008-06-06 20:57:50 +0000 |
commit | d06e3a6a62f066965810fecacaf4685a25a927df (patch) | |
tree | db7c6a5ebd27b16a04008f2f2ef66bc86793ecc6 /gdk | |
parent | 74b8297ee3b80b0f1fb45fc9b43947127005ad13 (diff) | |
download | gtk+-d06e3a6a62f066965810fecacaf4685a25a927df.tar.gz |
Return the right coordinates
svn path=/trunk/; revision=20325
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/x11/gdkwindow-x11.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index 56d5e20688..28dd8fbd4b 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -3379,6 +3379,7 @@ gdk_window_get_frame_extents (GdkWindow *window, Window xwindow; Window xparent; Window root; + Window child; Window *children; guchar *data; Window *vroots; @@ -3437,13 +3438,15 @@ gdk_window_get_frame_extents (GdkWindow *window, if ((type_return == XA_CARDINAL) && (format_return == 32) && (nitems_return == 4) && (data)) { - guint32 *ldata = (guint32 *) data; + gulong *ldata = (gulong *) data; got_frame_extents = TRUE; /* try to get the real client window geometry */ if (XGetGeometry (GDK_DISPLAY_XDISPLAY (display), xwindow, - &root, &wx, &wy, &ww, &wh, &wb, &wd)) - { + &root, &wx, &wy, &ww, &wh, &wb, &wd) && + XTranslateCoordinates (GDK_DISPLAY_XDISPLAY (display), + xwindow, root, 0, 0, &wx, &wy, &child)) + { rect->x = wx; rect->y = wy; rect->width = ww; |