From 2ac79eae08a5c68d29276c70c01781bd5c25031a Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Tue, 9 Sep 2025 21:45:10 +0200 Subject: 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. --- src/winwidget.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') 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)) { -- cgit v1.2.3