summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--src/imlib.c5
-rw-r--r--src/keyevents.c3
-rw-r--r--src/menu.c3
-rw-r--r--src/winwidget.c4
5 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 28b6ed0..09d8a1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,8 @@ git HEAD
* Short option -Y for --hide-pointer
* Panning via keys: Make it behave like scrolling (inverted directions)
* Patch by Live Smith: Add --action-hold-slide option
+ * Workaround for Xinerama fuckups: Set XINERAMA_SCREEN to the correct
+ xinerama screen number
Tue, 24 Aug 2010 19:23:36 +0200 Daniel Friesel <derf@chaosdorf.de>
diff --git a/src/imlib.c b/src/imlib.c
index 206282a..48bc4ea 100644
--- a/src/imlib.c
+++ b/src/imlib.c
@@ -55,7 +55,10 @@ void init_xinerama(void)
{
if (opt.xinerama && XineramaIsActive(disp)) {
int major, minor;
- xinerama_screen = 0;
+ if (getenv("XINERAMA_SCREEN"))
+ xinerama_screen = atoi(getenv("XINERAMA_SCREEN"));
+ else
+ xinerama_screen = 0;
XineramaQueryVersion(disp, &major, &minor);
xinerama_screens = XineramaQueryScreens(disp, &num_xinerama_screens);
}
diff --git a/src/keyevents.c b/src/keyevents.c
index c2c50ae..81e43e7 100644
--- a/src/keyevents.c
+++ b/src/keyevents.c
@@ -419,6 +419,9 @@ void feh_event_handle_keypress(XEvent * ev)
break;
}
}
+ if (getenv("XINERAMA_SCREEN"))
+ curr_screen = xinerama_screen =
+ atoi(getenv("XINERAMA_SCREEN"));
}
#endif /* HAVE_LIBXINERAMA */
winwid->full_screen = !winwid->full_screen;
diff --git a/src/menu.c b/src/menu.c
index 9fb89df..c50f015 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -1258,6 +1258,9 @@ void feh_menu_cb_opt_fullscreen(feh_menu * m, feh_menu_item * i)
}
}
+ if (getenv("XINERAMA_SCREEN"))
+ curr_screen = xinerama_screen =
+ atoi(getenv("XINERAMA_SCREEN"));
}
#endif /* HAVE_LIBXINERAMA */
diff --git a/src/winwidget.c b/src/winwidget.c
index e0862f8..771024b 100644
--- a/src/winwidget.c
+++ b/src/winwidget.c
@@ -158,6 +158,8 @@ void winwidget_create_window(winwidget ret, int w, int h)
if (opt.xinerama && xinerama_screens) {
w = xinerama_screens[xinerama_screen].width;
h = xinerama_screens[xinerama_screen].height;
+ x = xinerama_screens[xinerama_screen].x_org;
+ y = xinerama_screens[xinerama_screen].y_org;
}
#endif /* HAVE_LIBXINERAMA */
} else if (opt.geom_flags) {
@@ -779,6 +781,8 @@ void winwidget_resize(winwidget winwid, int w, int h)
}
}
+ if (getenv("XINERAMA_SCREEN"))
+ xinerama_screen = atoi(getenv("XINERAMA_SCREEN"));
}
#endif /* HAVE_LIBXINERAMA */