Skip to content
Snippets Groups Projects
Commit f0361c5e authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

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.
parent 5dc616ea
No related branches found
No related tags found
No related merge requests found
...@@ -710,8 +710,8 @@ void feh_event_handle_generic(winwidget winwid, unsigned int state, KeySym keysy ...@@ -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)) { else if (feh_is_kp(EVENT_toggle_pause, state, keysym, button)) {
slideshow_pause_toggle(winwid); slideshow_pause_toggle(winwid);
/* We need to reload the image to update the info string immediately. */ /* We need to re-render the image to update the info string immediately. */
feh_reload_image(winwid, 0, 0); winwidget_render_image(winwid, 0, 0);
} }
else if (feh_is_kp(EVENT_save_image, state, keysym, button)) { else if (feh_is_kp(EVENT_save_image, state, keysym, button)) {
slideshow_save_image(winwid); slideshow_save_image(winwid);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment