Package: feh Version: 1.3.4.dfsg.1-1 feh full screen mode cannot use second screen.
I use dual screen with Xinerama. When feh window is moved to the second screen and hit v key (Toggle fullscreen), feh should use the second screen for full screen mode. But actually feh use the first screen. It seems that feh try to choose the screen which the feh window exists. But the winwidget_get_geometry() has a bug. XGetGeometry returns the position relative to the parent window. In most case, the parent window is the window frame created by a window manager. So XGetGeometry returns small values. feh interpretes the values as absolute position. So feh misunderstand the window exists in the first screen. XTranslateCoordinates can be used to convert the small values to the absolute position. This fix makes us possible to choose a screen for full screen mode in dual screen (Xinerama) environment. I sent this fix to the feh bug report address described in the man page. But no reply yet. --- src/keyevents.c 2005-07-14 20:59:03.000000000 +0900 +++ src/keyevents.c 2010-01-03 06:08:14.764034775 +0900 @@ -385,10 +385,6 @@ 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); */ diff -ru feh-1.3.4-/src/menu.c feh-1.3.4/src/menu.c --- src/menu.c 2005-07-14 20:59:03.000000000 +0900 +++ src/menu.c 2010-01-03 06:08:30.180025354 +0900 @@ -2071,10 +2071,6 @@ 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 -ru feh-1.3.4-/src/winwidget.c feh-1.3.4/src/winwidget.c --- src/winwidget.c 2005-07-14 20:59:03.000000000 +0900 +++ src/winwidget.c 2010-01-03 06:05:18.822031320 +0900 @@ -1034,6 +1034,7 @@ void winwidget_get_geometry(winwidget winwid, int *rect) { int bw, bp; + Window child; D_ENTER(4); if (!rect) return; @@ -1041,6 +1042,9 @@ 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]; -- Tanaka Akira -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org