Commit 48721aa1 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

winwidget_render_image: re-zoom image in scaledown/geometry mode after ConfigureNotify event

parent 02420aef
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -428,6 +428,15 @@ void winwidget_render_image(winwidget winwid, int resize, int force_alias)
				&& (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);


	if (resize && (winwid->full_screen
                     || (opt.geom_flags & (WidthValue | HeightValue)))) {