diff options
author | Daniel Friesel <derf@finalrewind.org> | 2016-04-24 12:40:01 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2016-04-24 12:40:01 +0200 |
commit | 48721aa131f09ffcfe2f35499d3d8fb5a58cb60a (patch) | |
tree | 1cd7c1a278ce819489b60ba615400b94150859d4 /src | |
parent | 02420aefa5bcdd6cc58c67d736e5ebe34b1f1b4f (diff) |
winwidget_render_image: re-zoom image in scaledown/geometry mode after ConfigureNotify event
Diffstat (limited to 'src')
-rw-r--r-- | src/winwidget.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/winwidget.c b/src/winwidget.c index 7b178b6..f249694 100644 --- a/src/winwidget.c +++ b/src/winwidget.c @@ -424,8 +424,17 @@ void winwidget_render_image(winwidget winwid, int resize, int force_alias) feh_draw_checks(winwid); if (!winwid->full_screen && opt.zoom_mode - && (winwid->zoom == 1.0) && ! (opt.geom_flags & (WidthValue | HeightValue)) - && (winwid->w > winwid->im_w) && (winwid->h > winwid->im_h)) + && (winwid->zoom == 1.0) && ! (opt.geom_flags & (WidthValue | HeightValue)) + && (winwid->w > winwid->im_w) && (winwid->h > winwid->im_h)) + feh_calc_needed_zoom(&(winwid->zoom), winwid->im_w, winwid->im_h, winwid->w, winwid->h); + + /* + * In case of a resize, the geomflags (and im_w, im_h) get updated by + * the ConfigureNotify handler. + */ + if (need_center && !winwid->full_screen + && (opt.geom_flags & (WidthValue | HeightValue)) + && ((winwid->w < winwid->im_w) || (winwid->h < winwid->im_h))) feh_calc_needed_zoom(&(winwid->zoom), winwid->im_w, winwid->im_h, winwid->w, winwid->h); |