Return the right coordinates

svn path=/trunk/; revision=20325
This commit is contained in:
Matthias Clasen
2008-06-06 20:57:50 +00:00
parent 74b8297ee3
commit d06e3a6a62
2 changed files with 14 additions and 3 deletions

View File

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