From 446f815540fc1608215924513a208340c6a5f7b9 Mon Sep 17 00:00:00 2001 From: Finn Teegen Date: Wed, 10 Jan 2024 13:34:08 +0100 Subject: Add support for simple tap zones derf/feh#726 --- src/events.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/events.c') 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; -- cgit v1.2.3