feh icon indicating copy to clipboard operation
feh copied to clipboard

First image opened does not scale down

Open desolatorxxl opened this issue 4 years ago • 7 comments

The first image I open with feh won't be scaled down immediately in bspwm:

Image

(I'm running /bin/feh --auto-zoom --scale-down w7tvLqs.jpg in th GIF)

Resizing the window, hitting w or moving back and forward between images will scale the image correctly though.

This works just fine with imv for example.

Here are the versions I'm running:

$ uname -r
5.4.13-arch1-1
$ bspwm -v
0.9.7-10-g2ffd9c1
$ /bin/feh -version
feh version 3.3
Compile-time switches: curl exif inotify help stat64 verscmp xinerama

Any help or guidance would be appreciated, thanks!

desolatorxxl avatar Jan 25 '20 09:01 desolatorxxl

I digged around a bit and found out that this issue is caused by this commit: https://github.com/derf/feh/pull/462/commits/11eeb961f15219da506a050ffc432e052689dcd6

Reverting the commit and recompiling fixes the issue.

Edit: Pasted wrong commit hash.

desolatorxxl avatar Jan 28 '20 20:01 desolatorxxl

I have a similar problem that I bisect'ed to the same commit.

~/code/_tmp/feh [bisect] ∃ git bisect good
11eeb961f15219da506a050ffc432e052689dcd6 is the first bad commit
commit 11eeb961f15219da506a050ffc432e052689dcd6
Author: Elaina Martineau <[email protected]>
Date:   Thu Mar 14 18:40:20 2019 -0600

    Get geometry after mapping

 src/winwidget.c | 2 ++
 1 file changed, 2 insertions(+)

I've also confirmed that reverting this commit on top of master fixes my issue.

In i3, I set feh to show as floating and I use --scale-down through a theme.

$ cat ~/.config/feh/themes
feh --scale-down

Ever since that commit, an image that needs to be scaled down to fit my screen (usually vertically) is not positioned correctly and instead shows like this:

2020-07-04_20-15-34_feh_scale-down-bug The image shown can be found at https://www.pixiv.net/en/artworks/72848360.

Trying to drag in the image makes the image render correctly perfectly within the window's geometry, as does selecting the next image and going back, because this only occurs when feh is first started. The timestamp also roughly matches since I've had this problem for many months but didn't bother to investigate further.

FichteFoll avatar Jul 04 '20 18:07 FichteFoll

This is still an issue for me. @CrackedP0t, maybe you could elaborate why this "fix" was needed and how it resulted in bad behavior for apparently only two of us (considering the lack of other reports)?

FichteFoll avatar Oct 07 '20 22:10 FichteFoll

I have got the exact same issue. I am on i3 as well and opening feh in a a floating window results in the image being incorrectly positioned in the window. Trying to scroll the image will reposition the image correctly. For now I work aroud this with the --reload option.

hachiman-su avatar Nov 21 '20 14:11 hachiman-su

For the record, reverting the referenced commit still fixes the issue, but the fix is not proper because you can see that the initial position of the rendered image is wrong and after a quick flicker it is positioned (and resized) correctly.

This also happens when navigating to adjacent images without reverting the commit.

FichteFoll avatar Dec 11 '21 10:12 FichteFoll

This works fine in dwm. Maybe this is a bspwm issue?

desolatorxxl avatar Mar 27 '24 10:03 desolatorxxl