summaryrefslogtreecommitdiff
path: root/src/winwidget.c
diff options
context:
space:
mode:
authorulteq <ulteq@web.de>2018-01-25 15:03:45 +0100
committerulteq <ulteq@web.de>2018-03-10 21:30:54 +0100
commit0235156ba92bff1f9b023a2fd91540bfca66ce1b (patch)
tree7baf4a2295f2e0d9fa77b7890ad98cdca4fb0e09 /src/winwidget.c
parentf111cef018432cd12d9989c4f8b4ecd3dfa186bb (diff)
Simplify --keep-zoom-vp handling
Diffstat (limited to 'src/winwidget.c')
-rw-r--r--src/winwidget.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/winwidget.c b/src/winwidget.c
index 1ea6e9c..03aa9e8 100644
--- a/src/winwidget.c
+++ b/src/winwidget.c
@@ -426,8 +426,7 @@ void winwidget_render_image(winwidget winwid, int resize, int force_alias)
if (!winwid->full_screen && resize) {
winwidget_resize(winwid, winwid->im_w, winwid->im_h, 0);
- if (!opt.keep_zoom_vp)
- winwidget_reset_image(winwid);
+ winwidget_reset_image(winwid);
}
D(("winwidget_render_image resize %d force_alias %d im %dx%d\n",
@@ -953,10 +952,12 @@ void feh_debug_print_winwid(winwidget w)
void winwidget_reset_image(winwidget winwid)
{
- winwid->zoom = 1.0;
- winwid->old_zoom = 1.0;
- winwid->im_x = 0;
- winwid->im_y = 0;
+ if (!opt.keep_zoom_vp) {
+ winwid->zoom = 1.0;
+ winwid->old_zoom = 1.0;
+ winwid->im_x = 0;
+ winwid->im_y = 0;
+ }
winwid->im_angle = 0.0;
winwid->has_rotated = 0;
return;