diff options
| author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-09-09 21:45:10 +0200 | 
|---|---|---|
| committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-09-09 21:45:10 +0200 | 
| commit | 2ac79eae08a5c68d29276c70c01781bd5c25031a (patch) | |
| tree | eb67221e105cfcd12f3bc2d19d1080aa4ee4dbd0 | |
| parent | 0ce15f6b1934148b9f428d80910e0cc18ea617e5 (diff) | |
winwidget_resize: Do not call winwidget_get_geometry after XFlush
While calling winwidget_get_geometry(winwid, NULL); at this point
would help alleviate flashing issues that can occur when feh has
to render a window two times in a row, or renders the initial image
with a resolution that differs from the one that is needed to
accomodate the resize.
However, it would also break --scale-down in floating setups. As
flashing is less annoying, we do not call winwidget_get_geometry.
here.
Partially reverts 6af56d5411a0ced369d6f8125092fd1a051b497e
See also https://github.com/derf/feh/pull/462
Thanks to Awal Garg for several joint debugging sessions.
| -rw-r--r-- | src/winwidget.c | 13 | 
1 files changed, 12 insertions, 1 deletions
| diff --git a/src/winwidget.c b/src/winwidget.c index 69b7033..033d04b 100644 --- a/src/winwidget.c +++ b/src/winwidget.c @@ -962,7 +962,18 @@ void winwidget_resize(winwidget winwid, int w, int h, int force_resize)  		winwid->had_resize = 1;  		XFlush(disp); -		winwidget_get_geometry(winwid, NULL); +		/* +		 * Note: +		 * While calling winwidget_get_geometry(winwid, NULL); at this point +		 * would help alleviate flashing issues that can occur when feh has +		 * to render a window two times in a row, or renders the initial image +		 * with a resolution that differs from the one that is needed to +		 * accomodate the resize. +		 * +		 * However, it would also break --scale-down in floating setups. As +		 * flashing is less annoying, we do not call winwidget_get_geometry. +		 * here. +		 */  		if (force_resize && (opt.geom_flags & (WidthValue | HeightValue))  				&& (winwid->type != WIN_TYPE_THUMBNAIL)) { | 
