diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/events.c | 2 | ||||
| -rw-r--r-- | src/filelist.c | 2 | ||||
| -rw-r--r-- | src/filelist.h | 1 | ||||
| -rw-r--r-- | src/imlib.c | 2 | ||||
| -rw-r--r-- | src/list.c | 2 | ||||
| -rw-r--r-- | src/main.c | 2 | ||||
| -rw-r--r-- | src/menu.c | 2 | ||||
| -rw-r--r-- | src/options.c | 2 | ||||
| -rw-r--r-- | src/options.h | 2 | ||||
| -rw-r--r-- | src/signals.c | 2 | ||||
| -rw-r--r-- | src/signals.h | 2 | ||||
| -rw-r--r-- | src/slideshow.c | 2 | ||||
| -rw-r--r-- | src/thumbnail.c | 2 | ||||
| -rw-r--r-- | src/winwidget.c | 31 |
14 files changed, 37 insertions, 19 deletions
diff --git a/src/events.c b/src/events.c index 77798b3..bafc517 100644 --- a/src/events.c +++ b/src/events.c @@ -1,7 +1,7 @@ /* events.c Copyright (C) 1999-2003 Tom Gilbert. -Copyright (C) 2010-2020 Birte Kristina Friesel. +Copyright (C) 2010-2024 Birte Kristina Friesel. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/filelist.c b/src/filelist.c index a5ad890..3d9bcef 100644 --- a/src/filelist.c +++ b/src/filelist.c @@ -1,7 +1,7 @@ /* filelist.c Copyright (C) 1999-2003 Tom Gilbert. -Copyright (C) 2010-2020 Birte Kristina Friesel. +Copyright (C) 2010-2024 Birte Kristina Friesel. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/filelist.h b/src/filelist.h index e648262..4fc3930 100644 --- a/src/filelist.h +++ b/src/filelist.h @@ -1,6 +1,7 @@ /* filelist.h Copyright (C) 1999-2003 Tom Gilbert. +Copyright (C) 2010-2024 Birte Kristina Friesel. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/imlib.c b/src/imlib.c index eb3f522..d2352fd 100644 --- a/src/imlib.c +++ b/src/imlib.c @@ -1,7 +1,7 @@ /* imlib.c Copyright (C) 1999-2003 Tom Gilbert. -Copyright (C) 2010-2020 Birte Kristina Friesel. +Copyright (C) 2010-2024 Birte Kristina Friesel. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to @@ -1,7 +1,7 @@ /* list.c Copyright (C) 1999-2003 Tom Gilbert. -Copyright (C) 2010-2020 Birte Kristina Friesel. +Copyright (C) 2010-2024 Birte Kristina Friesel. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to @@ -1,7 +1,7 @@ /* main.c Copyright (C) 1999-2003 Tom Gilbert. -Copyright (C) 2010-2020 Birte Kristina Friesel. +Copyright (C) 2010-2023 Birte Kristina Friesel. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to @@ -1,7 +1,7 @@ /* menu.c Copyright (C) 1999-2003 Tom Gilbert. -Copyright (C) 2010-2020 Birte Kristina Friesel. +Copyright (C) 2010-2024 Birte Kristina Friesel. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/options.c b/src/options.c index 3f405fa..d38ce45 100644 --- a/src/options.c +++ b/src/options.c @@ -1,7 +1,7 @@ /* options.c Copyright (C) 1999-2003 Tom Gilbert. -Copyright (C) 2010-2020 Birte Kristina Friesel. +Copyright (C) 2010-2024 Birte Kristina Friesel. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/options.h b/src/options.h index 2aed6a6..74c12cd 100644 --- a/src/options.h +++ b/src/options.h @@ -1,7 +1,7 @@ /* options.h Copyright (C) 1999-2003 Tom Gilbert. -Copyright (C) 2010-2020 Birte Kristina Friesel. +Copyright (C) 2010-2024 Birte Kristina Friesel. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/signals.c b/src/signals.c index 5a64883..058b8c9 100644 --- a/src/signals.c +++ b/src/signals.c @@ -1,6 +1,6 @@ /* signals.c -Copyright (C) 2010-2020 by Birte Kristina Friesel +Copyright (C) 2010-2023 by Birte Kristina Friesel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/signals.h b/src/signals.h index 505a071..3d78b67 100644 --- a/src/signals.h +++ b/src/signals.h @@ -1,6 +1,6 @@ /* signals.h -Copyright (C) 2010 by Birte Kristina Friesel +Copyright (C) 2010-2023 by Birte Kristina Friesel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/slideshow.c b/src/slideshow.c index 3944a68..266cb2e 100644 --- a/src/slideshow.c +++ b/src/slideshow.c @@ -1,7 +1,7 @@ /* slideshow.c Copyright (C) 1999-2003 Tom Gilbert. -Copyright (C) 2010-2020 Birte Kristina Friesel. +Copyright (C) 2010-2024 Birte Kristina Friesel. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/thumbnail.c b/src/thumbnail.c index 9ab727b..70af5e0 100644 --- a/src/thumbnail.c +++ b/src/thumbnail.c @@ -1,7 +1,7 @@ /* thumbnail.c Copyright (C) 1999-2003 Tom Gilbert. -Copyright (C) 2010-2020 Birte Kristina Friesel. +Copyright (C) 2010-2024 Birte Kristina Friesel. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/src/winwidget.c b/src/winwidget.c index b98cbef..809a0a6 100644 --- a/src/winwidget.c +++ b/src/winwidget.c @@ -1,7 +1,7 @@ /* winwidget.c Copyright (C) 1999-2003 Tom Gilbert. -Copyright (C) 2010-2020 Birte Kristina Friesel. +Copyright (C) 2010-2025 Birte Kristina Friesel. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to @@ -549,10 +549,16 @@ void winwidget_render_image(winwidget winwid, int resize, int force_alias) calc_h = lround(winwid->im_h * winwid->zoom); dw = (winwid->w - winwid->im_x); dh = (winwid->h - winwid->im_y); - if (calc_w < dw) + + D(("sx: %4d sy: %4d sw: sh: dx: %4d dy: %4d dw: %4d dh: %4d zoom: %f\n", + sx, sy, sw, sh, dx, dy, dw, dh, winwid->zoom)); + + if (calc_w < dw) { dw = calc_w; - if (calc_h < dh) + } + if (calc_h < dh) { dh = calc_h; + } if (dw > winwid->w) dw = winwid->w; if (dh > winwid->h) @@ -561,7 +567,7 @@ void winwidget_render_image(winwidget winwid, int resize, int force_alias) sw = lround(dw / winwid->zoom); sh = lround(dh / winwid->zoom); - D(("sx: %d sy: %d sw: %d sh: %d dx: %d dy: %d dw: %d dh: %d zoom: %f\n", + D(("sx: %4d sy: %4d sw: %4d sh: %4d dx: %4d dy: %4d dw: %4d dh: %4d zoom: %f\n", sx, sy, sw, sh, dx, dy, dw, dh, winwid->zoom)); if ((winwid->zoom != 1.0 || winwid->has_rotated) && !force_alias && !winwid->force_aliasing) @@ -952,7 +958,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)) { @@ -1108,11 +1125,11 @@ void winwidget_center_image(winwidget winwid) if (opt.geom_flags & WidthValue) winwid->im_x = ((int)opt.geom_w - lround(winwid->im_w * winwid->zoom)) >> 1; else - winwid->im_x = 0; + winwid->im_x = (int) (winwid->w - lround(winwid->im_w * winwid->zoom)) >> 1; if (opt.geom_flags & HeightValue) winwid->im_y = ((int)opt.geom_h - lround(winwid->im_h * winwid->zoom)) >> 1; else - winwid->im_y = 0; + winwid->im_y = (int) (winwid->h - lround(winwid->im_h * winwid->zoom)) >> 1; } } |
