summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2010-12-30 08:32:32 +0100
committerDaniel Friesel <derf@finalrewind.org>2010-12-30 08:32:32 +0100
commitd752283609184eccfb96aa25df316e7554275933 (patch)
treea5286e65852f0eda84ab62baae176bd84c3ee21a
parent779de2316baff0915faa3ffa6a5ff972360c5ae7 (diff)
Fix zooming with --scale-down. <keypad *> does not yet work, though.
-rw-r--r--src/winwidget.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/winwidget.c b/src/winwidget.c
index 26a43e2..05a4a3a 100644
--- a/src/winwidget.c
+++ b/src/winwidget.c
@@ -383,7 +383,8 @@ void winwidget_render_image(winwidget winwid, int resize, int alias)
winwidget_setup_pixmaps(winwid);
if (!winwid->full_screen && opt.scale_down && ((winwid->w < winwid->im_w)
- || (winwid->h < winwid->im_h))) {
+ || (winwid->h < winwid->im_h)) &&
+ (winwid->old_zoom == 1.0)) {
D(("scaling down image %dx%d\n", winwid->w, winwid->h));
feh_calc_needed_zoom(&(winwid->zoom), winwid->im_w, winwid->im_h, winwid->w, winwid->h);
@@ -908,6 +909,7 @@ 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;
winwid->im_angle = 0.0;