diff options
author | Daniel Friesel <derf@finalrewind.org> | 2015-07-23 21:53:31 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2015-07-23 21:53:31 +0200 |
commit | 9bc266a0736ee4b02ec727c0a4b2417c62c874c9 (patch) | |
tree | b5dad42814b44834505a2fa18533ae4695fbfea0 /src | |
parent | 4d11fb3ed92828f8840e06945801e7c9befc823f (diff) |
use --xinerama-index instead of XINERAMA_INDEX to override xinerama screen selection
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; |