diff options
-rw-r--r-- | src/keyevents.c | 4 | ||||
-rw-r--r-- | src/menu.c | 4 | ||||
-rw-r--r-- | src/winwidget.c | 4 |
3 files changed, 4 insertions, 8 deletions
diff --git a/src/keyevents.c b/src/keyevents.c index 803b71c..376a33a 100644 --- a/src/keyevents.c +++ b/src/keyevents.c @@ -385,10 +385,6 @@ feh_event_handle_keypress(XEvent * ev) if (opt.xinerama && xinerama_screens) { int i, rect[4]; - /* FIXME: this doesn't do what it should; XGetGeometry always - * returns x,y == 0,0. I think that's due to the hints being passed - * (or more specifically, a missing hint) to X in winwidget_create - */ winwidget_get_geometry(winwid, rect); /* printf("window: (%d, %d)\n", rect[0], rect[1]); printf("found %d screens.\n", num_xinerama_screens); */ @@ -2071,10 +2071,6 @@ feh_menu_cb_opt_fullscreen(feh_menu * m, if (opt.xinerama && xinerama_screens) { int i, rect[4]; - /* FIXME: this doesn't do what it should; XGetGeometry always - * returns x,y == 0,0. I think that's due to the hints being passed - * (or more specifically, a missing hint) to X in winwidget_create - */ winwidget_get_geometry(m->fehwin, rect); /* printf("window: (%d, %d)\n", rect[0], rect[1]); printf("found %d screens.\n", num_xinerama_screens); */ 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]; |