summaryrefslogtreecommitdiff
path: root/src/imlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/imlib.c')
-rw-r--r--src/imlib.c5
1 files changed, 4 insertions, 1 deletions
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);
}