summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--COPYING2
-rw-r--r--ChangeLog29
-rw-r--r--man/feh.pre2
-rw-r--r--share/images/feh.svg234
-rw-r--r--src/events.c2
-rw-r--r--src/filelist.c2
-rw-r--r--src/filelist.h1
-rw-r--r--src/imlib.c2
-rw-r--r--src/list.c2
-rw-r--r--src/main.c2
-rw-r--r--src/menu.c2
-rw-r--r--src/options.c2
-rw-r--r--src/options.h2
-rw-r--r--src/signals.c2
-rw-r--r--src/signals.h2
-rw-r--r--src/slideshow.c2
-rw-r--r--src/thumbnail.c2
-rw-r--r--src/winwidget.c31
18 files changed, 139 insertions, 184 deletions
diff --git a/COPYING b/COPYING
index 6e86580..9fc8e67 100644
--- a/COPYING
+++ b/COPYING
@@ -1,5 +1,5 @@
Copyright (C) 1999,2000 Tom Gilbert.
-Copyright (C) 2010-2024 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
diff --git a/ChangeLog b/ChangeLog
index a9e6b02..efcfd4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,32 @@
+Tue, 09 Sep 2025 21:49:48 +0200 Birte Friesel <derf+feh@finalrewind.org>
+
+* Release v3.11.2
+ * Fix zoom_fit not centering the image correctly if the window is larger
+ than the image
+ * Fix rendering bugs introduced by attempts to fix a --scale-down
+ rendering issue in v3.11 and v3.11.1
+ * Note that this fix comes at the cost of slightly more visible
+ flashing in some cases where feh has to (re-)render an image multiple
+ times, especially if a fixed size is forced by the window manager.
+ While this behaviour can be annoying, it is certainly less annoying than
+ incorrect image offets.
+ * Thanks to Awal Garg for several joint debugging sessions related to
+ --scale-down rendering issues.
+
+Fri, 29 Aug 2025 19:14:26 +0200 Birte Friesel <derf+feh@finalrewind.org>
+
+* Release v3.11.1
+ * Correctly center images in fullscreen mode. This fixes a regression
+ introduced in v3.11.
+
+Wed, 27 Aug 2025 21:39:43 +0200 Birte Friesel <derf+feh@finalrewind.org>
+
+* Release v3.11
+ * New option: --tap-zones enables support for simple prev/next tap zones
+ (patch by Finn Teegen, thanks!)
+ * Fix --scale-down not scaling down the first image in floating i3 windows
+ and similar setups (patch by Awal Garg, thanks!)
+
Sun, 30 Jun 2024 11:47:16 +0200 Birte Friesel <derf+feh@finalrewind.org>
* Release v3.10.3
diff --git a/man/feh.pre b/man/feh.pre
index cdfaa15..ca64d37 100644
--- a/man/feh.pre
+++ b/man/feh.pre
@@ -2243,7 +2243,7 @@ is a hobby project, so bug reports may be addressed with significant delays.
.
Copyright (C) 1999, 2000 by Paul Duncan.
Copyright (C) 1999, 2000 by Tom Gilbert and contributors.
-Copyright (C) 2010-2024 by Birte Kristina Friesel and contributors.
+Copyright (C) 2010-2025 by Birte Kristina Friesel and contributors.
.
.Pp
.
diff --git a/share/images/feh.svg b/share/images/feh.svg
index 7984c46..66f3f1c 100644
--- a/share/images/feh.svg
+++ b/share/images/feh.svg
@@ -2,198 +2,106 @@
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="100"
height="100"
- id="svg2"
version="1.1"
- inkscape:version="0.91 r13725"
- sodipodi:docname="feh.svg">
- <defs
- id="defs4">
+>
+ <defs>
<linearGradient
- id="linearGradient3659"
- inkscape:collect="always">
- <stop
- id="stop3661"
- offset="0"
- style="stop-color:#cd022f;stop-opacity:1;" />
- <stop
- id="stop3663"
- offset="1"
- style="stop-color:#cd022f;stop-opacity:0;" />
- </linearGradient>
- <linearGradient
- id="linearGradient3619">
+ id="linear_gradient_for_letters"
+ x1="60.296875"
+ y1="1026.6521"
+ x2="141.11719"
+ y2="1026.6521"
+ gradientUnits="userSpaceOnUse"
+ >
<stop
- style="stop-color:#b60000;stop-opacity:0.80392158;"
offset="0"
- id="stop3621" />
+ stop-color="#cd022f"
+ stop-opacity="1"
+ />
<stop
- style="stop-color:#b60000;stop-opacity:0;"
offset="1"
- id="stop3623" />
+ stop-color="#cd022f"
+ stop-opacity="0"
+ />
</linearGradient>
- <inkscape:perspective
- sodipodi:type="inkscape:persp3d"
- inkscape:vp_x="0 : 526.18109 : 1"
- inkscape:vp_y="0 : 1000 : 0"
- inkscape:vp_z="744.09448 : 526.18109 : 1"
- inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
- id="perspective10" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3659"
- id="linearGradient3667"
- x1="60.296875"
- y1="1026.6521"
- x2="141.11719"
- y2="1026.6521"
- gradientUnits="userSpaceOnUse" />
<filter
- id="filter3859"
- inkscape:label="Drop shadow"
+ id="filter_for_shadow"
width="1.5"
height="1.5"
x="-0.25"
- y="-0.25">
+ y="-0.25"
+ >
<feGaussianBlur
- id="feGaussianBlur3861"
in="SourceAlpha"
- stdDeviation="1.000000"
- result="blur" />
+ stdDeviation="1"
+ result="blur"
+ />
<feColorMatrix
- id="feColorMatrix3863"
result="bluralpha"
type="matrix"
- values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.900000 0 " />
+ values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.9 0"
+ />
<feOffset
- id="feOffset3865"
in="bluralpha"
- dx="2.000000"
- dy="2.000000"
- result="offsetBlur" />
- <feMerge
- id="feMerge3867">
+ dx="2"
+ dy="2"
+ result="offsetBlur"
+ />
+ <feMerge>
<feMergeNode
- id="feMergeNode3869"
- in="offsetBlur" />
+ in="offsetBlur"
+ />
<feMergeNode
- id="feMergeNode3871"
- in="SourceGraphic" />
+ in="SourceGraphic"
+ />
</feMerge>
</filter>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3659"
- id="linearGradient3356"
- gradientUnits="userSpaceOnUse"
- x1="60.296875"
- y1="1026.6521"
- x2="141.11719"
- y2="1026.6521" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3659"
- id="linearGradient3358"
- gradientUnits="userSpaceOnUse"
- x1="60.296875"
- y1="1026.6521"
- x2="141.11719"
- y2="1026.6521" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3659"
- id="linearGradient3360"
- gradientUnits="userSpaceOnUse"
- x1="60.296875"
- y1="1026.6521"
- x2="141.11719"
- y2="1026.6521" />
</defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="2"
- inkscape:cx="74.605459"
- inkscape:cy="135"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="false"
- inkscape:window-width="1088"
- inkscape:window-height="883"
- inkscape:window-x="0"
- inkscape:window-y="0"
- inkscape:window-maximized="0" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
<g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-952.3622)">
+ transform="translate(-50.707033,-976.6521)"
+ opacity="1"
+ fill-opacity="1"
+ fill-rule="nonzero"
+ stroke="none"
+ >
+ <!-- shadows -->
+ <g
+ fill="black"
+ filter="url(#filter_for_shadow)"
+ >
+ <!-- shadow for letter "F" -->
+ <path
+ d="m 60.296875,1012.072 20.292969,0 0,5.6836 -12.773438,0 0,5.4297 12.011719,0 0,5.6836 -12.011719,0 0,12.3633 -7.519531,0 0,-29.1602"
+ />
+ <!-- shadow for letter "E" -->
+ <path
+ d="m 87.640625,1012.072 20.292965,0 0,5.6836 -12.77343,0 0,5.4297 12.01172,0 0,5.6836 -12.01172,0 0,6.6797 13.20312,0 0,5.6836 -20.722655,0 0,-29.1602"
+ />
+ <!-- shadow for letter "H" -->
+ <path
+ d="m 114.98438,1012.072 7.51953,0 0,11.1133 11.09375,0 0,-11.1133 7.51953,0 0,29.1602 -7.51953,0 0,-12.3633 -11.09375,0 0,12.3633 -7.51953,0 0,-29.1602"
+ />
+ </g>
+ <!-- letters -->
<g
- id="g3362"
- transform="translate(-50.707033,-24.2899)">
- <g
- id="g3669"
- style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-opacity:1;filter:url(#filter3859)">
- <path
- inkscape:connector-curvature="0"
- d="m 60.296875,1012.072 20.292969,0 0,5.6836 -12.773438,0 0,5.4297 12.011719,0 0,5.6836 -12.011719,0 0,12.3633 -7.519531,0 0,-29.1602"
- style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;font-family:'DejaVu Sans';-inkscape-font-specification:'Catharsis Bedouin Bold';fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-opacity:1"
- id="path3671" />
- <path
- inkscape:connector-curvature="0"
- d="m 87.640625,1012.072 20.292965,0 0,5.6836 -12.77343,0 0,5.4297 12.01172,0 0,5.6836 -12.01172,0 0,6.6797 13.20312,0 0,5.6836 -20.722655,0 0,-29.1602"
- style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;font-family:'DejaVu Sans';-inkscape-font-specification:'Catharsis Bedouin Bold';fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-opacity:1"
- id="path3673" />
- <path
- inkscape:connector-curvature="0"
- d="m 114.98438,1012.072 7.51953,0 0,11.1133 11.09375,0 0,-11.1133 7.51953,0 0,29.1602 -7.51953,0 0,-12.3633 -11.09375,0 0,12.3633 -7.51953,0 0,-29.1602"
- style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;font-family:'DejaVu Sans';-inkscape-font-specification:'Catharsis Bedouin Bold';fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-opacity:1"
- id="path3675" />
- </g>
- <g
- style="opacity:1;fill:url(#linearGradient3667);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-opacity:1"
- id="g2834">
- <path
- inkscape:connector-curvature="0"
- id="path2825"
- style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;font-family:'DejaVu Sans';-inkscape-font-specification:'Catharsis Bedouin Bold';fill:url(#linearGradient3356);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-opacity:1"
- d="m 60.296875,1012.072 20.292969,0 0,5.6836 -12.773438,0 0,5.4297 12.011719,0 0,5.6836 -12.011719,0 0,12.3633 -7.519531,0 0,-29.1602" />
- <path
- inkscape:connector-curvature="0"
- id="path2827"
- style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;font-family:'DejaVu Sans';-inkscape-font-specification:'Catharsis Bedouin Bold';fill:url(#linearGradient3358);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-opacity:1"
- d="m 87.640625,1012.072 20.292965,0 0,5.6836 -12.77343,0 0,5.4297 12.01172,0 0,5.6836 -12.01172,0 0,6.6797 13.20312,0 0,5.6836 -20.722655,0 0,-29.1602" />
- <path
- inkscape:connector-curvature="0"
- id="path2829"
- style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;font-family:'DejaVu Sans';-inkscape-font-specification:'Catharsis Bedouin Bold';fill:url(#linearGradient3360);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-opacity:1"
- d="m 114.98438,1012.072 7.51953,0 0,11.1133 11.09375,0 0,-11.1133 7.51953,0 0,29.1602 -7.51953,0 0,-12.3633 -11.09375,0 0,12.3633 -7.51953,0 0,-29.1602" />
- </g>
+ fill="url(#linear_gradient_for_letters)"
+ >
+ <!-- letter "F" -->
+ <path
+ d="m 60.296875,1012.072 20.292969,0 0,5.6836 -12.773438,0 0,5.4297 12.011719,0 0,5.6836 -12.011719,0 0,12.3633 -7.519531,0 0,-29.1602"
+ />
+ <!-- letter "E" -->
+ <path
+ d="m 87.640625,1012.072 20.292965,0 0,5.6836 -12.77343,0 0,5.4297 12.01172,0 0,5.6836 -12.01172,0 0,6.6797 13.20312,0 0,5.6836 -20.722655,0 0,-29.1602"
+ />
+ <!-- letter "H" -->
+ <path
+ d="m 114.98438,1012.072 7.51953,0 0,11.1133 11.09375,0 0,-11.1133 7.51953,0 0,29.1602 -7.51953,0 0,-12.3633 -11.09375,0 0,12.3633 -7.51953,0 0,-29.1602"
+ />
</g>
</g>
</svg>
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
diff --git a/src/list.c b/src/list.c
index 0ef31ea..0fdc6a5 100644
--- a/src/list.c
+++ b/src/list.c
@@ -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
diff --git a/src/main.c b/src/main.c
index 78ee616..2503773 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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
diff --git a/src/menu.c b/src/menu.c
index 9c20692..96173a4 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -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;
}
}