summaryrefslogtreecommitdiff
path: root/src/winwidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/winwidget.c')
-rw-r--r--src/winwidget.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/winwidget.c b/src/winwidget.c
index 38d6db6..fe98e85 100644
--- a/src/winwidget.c
+++ b/src/winwidget.c
@@ -1034,6 +1034,7 @@ int winwidget_get_height(winwidget winwid) {
void winwidget_get_geometry(winwidget winwid, int *rect) {
int bw, bp;
+ Window child;
D_ENTER(4);
if (!rect)
return;
@@ -1041,6 +1042,9 @@ void winwidget_get_geometry(winwidget winwid, int *rect) {
XGetGeometry(disp, winwid->win, &root,
&(rect[0]), &(rect[1]), &(rect[2]), &(rect[3]), &bw, &bp);
+ XTranslateCoordinates(disp, winwid->win, root,
+ 0, 0, &(rect[0]), &(rect[1]), &child);
+
/* update the window geometry (in case it's inaccurate) */
winwid->x = rect[0];
winwid->y = rect[1];