derf / feh

a fast and light image viewer
https://feh.finalrewind.org
Other
1.53k stars 159 forks source link

--keep-zoom and preserving window geometry #702

Open seahorse41 opened 1 year ago

seahorse41 commented 1 year ago

I use feh to compare images when zoomed into a snaller area of interest, A-B comparison. It worked perfectly in Debian Stretch, but after upgrading to Bullseye, now feh version 3.6.3 does not behave the same, I think it is a bug. Upon searching here, I saw the same issue was apparently fixed at #408 and #410. To reproduce, choose 2 images of the same size, 640x480 is adequate. $ feh --keep-zoom-vp %t The geometry starts at 640x480 at zoom level 1. Press up arrow 4 times, zoom increases, Press right and left, Drag left and right with mouse, is good so far. But if I resize the window, then each left and right will forget the window geometry. Continuing from example, zoomed in 4x, pan to upper-right corner. Left/right is still good. Drag right side border inwards to narrow it up, (so I can see a different window at the same time to take notes.) Then press right, and poof, the window fills the screen and has reset the location. Press down 3 times so the image is smaller then the desktop, and press left or right. Now the window shrinks. Any change in zoom in or out, followed by left or right, resets the window. Thus any effort to pan becomes limited to the current image, and A-B comparisons are no longer possible without starting over. It seems keeping geometry has been decoupled from keep zoom.

Also note that starting without the --keep-zoom, I can zoom out and press left/right and it does not do this behavior. So there must be a third mode it is entering.

After further experimenting, I can do a work-around by specifying -g and it will keep the geometry I resize it to.