Fix incorrect zoom at init with --scale-down #776
Conversation
|
Hi, thanks for taking a look at this problem! Unfortunately, it doesn't seem to be quite that trivial. On my i3wm setup, feh's I'll leave this PR open in the hope that I (or someone else) will have the capacity to get back to it, dig a little deeper into the leads you found, and maybe properly resolve it eventually. |
|
Could you check whether this issue still occurs with 856cb97? |
|
That's good to hear, thanks for checking. I'll close this PR, as the underlying issue should no longer be present. |
Hello. When using the
--scale-downoption, images render incorrectly at first on my setup (Xfce). After resizing feh, the image renders correctly. The following issues may be related:#696
#504
#494
I don't have any experience with Xlib, but I did narrow it down to a race condition occurring between
winwidget_create_from_fileandwinwidget_showhere:feh/src/slideshow.c
Lines 109 to 111 in 70a7b06
For example, if I set a breakpoint on
winwidget_get_geometry(which is invoked by both of the above functions) and simply continue on both breaks, the image renders properly.The comment about
ConfigureNotifyinwinwidget_showcaught my eye, and I noticed that theConfigureNotifyhandler was also invoked when resizing the window (which fixes rendering), except that it falls into this branch:feh/src/events.c
Lines 432 to 434 in 70a7b06
Forcing this to occur in
winwidget_showby invalidating the width property seems to fix the issue. Obviously not ideal but this seems to be a painless workaround, at least on my setup, until there is a real fix.