From 918edfaa6254fcd7d328ced434f361b19a636576 Mon Sep 17 00:00:00 2001 From: reiseb <48870100+reiseb@users.noreply.github.com> Date: Sun, 12 Jan 2020 15:48:57 +0100 Subject: add option 'a' to show play/paused information in slideshow mode --- src/keyevents.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/keyevents.c') diff --git a/src/keyevents.c b/src/keyevents.c index 0da07d3..761ec3c 100644 --- a/src/keyevents.c +++ b/src/keyevents.c @@ -710,6 +710,8 @@ void feh_event_handle_generic(winwidget winwid, unsigned int state, KeySym keysy } else if (feh_is_kp(EVENT_toggle_pause, state, keysym, button)) { slideshow_pause_toggle(winwid); + /* We need to reload the image to update the info string immediately. */ + feh_reload_image(winwid, 0, 0); } else if (feh_is_kp(EVENT_save_image, state, keysym, button)) { slideshow_save_image(winwid); -- cgit v1.2.3 From f0361c5ea6fcdc181863286dbe4de36003eccb9d Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 17 Jun 2020 19:10:36 +0200 Subject: toggle_pause: Re-render the image instead of reloading When the slideshow state is toggled, the info line needs to be redrawn as it may use the %a format specifier (which shows whether the slideshow is running or paused). feh_reload_image does this, but also resets all pan and zoom options and reloads the image from disk. winwidget_render_image only redraws info, caption and similar lines in this case, which is more efficient and does not incur unwanted side-effects. --- src/keyevents.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/keyevents.c') diff --git a/src/keyevents.c b/src/keyevents.c index 761ec3c..a5526a2 100644 --- a/src/keyevents.c +++ b/src/keyevents.c @@ -710,8 +710,8 @@ void feh_event_handle_generic(winwidget winwid, unsigned int state, KeySym keysy } else if (feh_is_kp(EVENT_toggle_pause, state, keysym, button)) { slideshow_pause_toggle(winwid); - /* We need to reload the image to update the info string immediately. */ - feh_reload_image(winwid, 0, 0); + /* We need to re-render the image to update the info string immediately. */ + winwidget_render_image(winwid, 0, 0); } else if (feh_is_kp(EVENT_save_image, state, keysym, button)) { slideshow_save_image(winwid); -- cgit v1.2.3