summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/feh.pre4
-rw-r--r--src/events.c9
-rw-r--r--src/help.raw1
-rw-r--r--src/options.c4
-rw-r--r--src/options.h2
5 files changed, 17 insertions, 3 deletions
diff --git a/man/feh.pre b/man/feh.pre
index a50ecf9..b3125be 100644
--- a/man/feh.pre
+++ b/man/feh.pre
@@ -437,6 +437,10 @@ Specify
as extra directory in which to search for fonts; can be used multiple times to
add multiple paths.
.
+.It Cm --tap-zones
+.
+Enable tap zones for previous/next file in slide show mode
+.
.It Cm --force-aliasing
.
Disable anti-aliasing for zooming, background setting etc.
diff --git a/src/events.c b/src/events.c
index de9e7b3..77798b3 100644
--- a/src/events.c
+++ b/src/events.c
@@ -366,9 +366,12 @@ static void feh_event_handle_ButtonRelease(XEvent * ev)
} else if (opt.mode == MODE_NEXT) {
opt.mode = MODE_NORMAL;
winwid->mode = MODE_NORMAL;
- if (winwid->type == WIN_TYPE_SLIDESHOW)
- slideshow_change_image(winwid, SLIDE_NEXT, 1);
- else if (winwid->type == WIN_TYPE_THUMBNAIL) {
+ if (winwid->type == WIN_TYPE_SLIDESHOW) {
+ if (opt.tap_zones && ev->xbutton.x < winwid->w / 2)
+ slideshow_change_image(winwid, SLIDE_PREV, 1);
+ else
+ slideshow_change_image(winwid, SLIDE_NEXT, 1);
+ } else if (winwid->type == WIN_TYPE_THUMBNAIL) {
feh_file *thumbfile;
int x, y;
diff --git a/src/help.raw b/src/help.raw
index e218e78..0e99c68 100644
--- a/src/help.raw
+++ b/src/help.raw
@@ -62,6 +62,7 @@ OPTIONS
reloads image with \";\", switches to next otherwise
--action[1-9] Extra actions triggered by pressing keys <1>to <9>
-G, --draw-actions Show the defined actions in the image window
+ --tap-zones Enable tap zones for previous/next file in slide show mode
--force-aliasing Disable antialiasing
-m, --montage Enable montage mode
-i, --index Create an index print of all images
diff --git a/src/options.c b/src/options.c
index 266ee0c..3f405fa 100644
--- a/src/options.c
+++ b/src/options.c
@@ -419,6 +419,7 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)
{"no-xinerama" , 0, 0, OPTION_no_xinerama},
{"draw-tinted" , 0, 0, OPTION_draw_tinted},
{"info" , 1, 0, OPTION_info},
+ {"tap-zones" , 0, 0, OPTION_tap_zones},
{"force-aliasing", 0, 0, OPTION_force_aliasing},
{"no-fehbg" , 0, 0, OPTION_no_fehbg},
{"keep-zoom-vp" , 0, 0, OPTION_keep_zoom_vp},
@@ -783,6 +784,9 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)
opt.draw_info = 1;
}
break;
+ case OPTION_tap_zones:
+ opt.tap_zones = 1;
+ break;
case OPTION_force_aliasing:
opt.force_aliasing = 1;
break;
diff --git a/src/options.h b/src/options.h
index aa3cd91..2aed6a6 100644
--- a/src/options.h
+++ b/src/options.h
@@ -107,6 +107,7 @@ struct __fehoptions {
char *index_info;
int force_aliasing;
+ int tap_zones;
int thumb_w;
int thumb_h;
int limit_w;
@@ -239,6 +240,7 @@ OPTION_auto_rotate,
OPTION_no_xinerama,
OPTION_draw_tinted,
OPTION_info,
+OPTION_tap_zones,
OPTION_force_aliasing,
OPTION_no_fehbg,
OPTION_scroll_step,