diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/imlib.c | 4 | ||||
-rw-r--r-- | src/keyevents.c | 5 | ||||
-rw-r--r-- | src/menu.c | 5 | ||||
-rw-r--r-- | src/winwidget.c | 4 |
4 files changed, 8 insertions, 10 deletions
diff --git a/src/imlib.c b/src/imlib.c index 10ab718..58a8608 100644 --- a/src/imlib.c +++ b/src/imlib.c @@ -78,8 +78,8 @@ void init_xinerama(void) XineramaQueryVersion(disp, &major, &minor); xinerama_screens = XineramaQueryScreens(disp, &num_xinerama_screens); - if (getenv("XINERAMA_SCREEN")) - xinerama_screen = atoi(getenv("XINERAMA_SCREEN")); + if (opt.xinerama_index >= 0) + xinerama_screen = opt.xinerama_index; else { xinerama_screen = 0; XQueryPointer(disp, root, &dw, &dw, &px, &py, &di, &di, &du); diff --git a/src/keyevents.c b/src/keyevents.c index 83fc358..4c1ed28 100644 --- a/src/keyevents.c +++ b/src/keyevents.c @@ -731,9 +731,8 @@ void feh_event_handle_keypress(XEvent * ev) break; } } - if (getenv("XINERAMA_SCREEN")) - curr_screen = xinerama_screen = - atoi(getenv("XINERAMA_SCREEN")); + if (opt.xinerama_index >= 0) + curr_screen = xinerama_screen = opt.xinerama_index; } #endif /* HAVE_LIBXINERAMA */ winwid->full_screen = !winwid->full_screen; @@ -1154,9 +1154,8 @@ 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")); + if (opt.xinerama_index >= 0) + curr_screen = xinerama_screen = opt.xinerama_index; } #endif /* HAVE_LIBXINERAMA */ diff --git a/src/winwidget.c b/src/winwidget.c index 65cefca..8bf1dbb 100644 --- a/src/winwidget.c +++ b/src/winwidget.c @@ -826,8 +826,8 @@ void winwidget_resize(winwidget winwid, int w, int h) } } - if (getenv("XINERAMA_SCREEN")) - xinerama_screen = atoi(getenv("XINERAMA_SCREEN")); + if (opt.xinerama_index >= 0) + xinerama_screen = opt.xinerama_index; scr_width = xinerama_screens[xinerama_screen].width; scr_height = xinerama_screens[xinerama_screen].height; |