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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);