BestImageViewer / geeqie

claiming to be the best image viewer / photo collection browser
http://www.geeqie.org/
GNU General Public License v2.0
479 stars 79 forks source link

Image in fixed size window smaller than X11 desktop sometimes gets wrong zoom, reproducible. #786

Open fidergo-stephane-gourichon opened 4 years ago

fidergo-stephane-gourichon commented 4 years ago

INTRO/CONGRATS

First, thank for maintaining the excellent tool geeqie. I used it already 20 years ago before the fork when it was named gqview. For many years it was fast and bug-free (for my use cases).

Since Xubuntu 20.04 I have troubles, first #785 which was not important.

This one is more troublesome because it undermines trust about geeqie showing the actual image and not a cropped version.

ISSUE TYPE

GEEQIE VERSION

/usr/bin/geeqie --version

Geeqie 1.5.1

What GTK toolkit is used to compile Geeqie?

Mmh, it's from official Ubuntu 20.04 repositories.

Appears to be gtk2, see below.

ldd /usr/bin/geeqie | grep -i gtk

    libgtk-x11-2.0.so.0 => /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 (0x00007f81b1987000)

OS / DISTRIBUTION

Xubuntu 20.04, running XFCE.

SUMMARY

Sometimes, when advancing through a directory of images, the zoom factor would change suddenly for some of the pictures.

Happens when the image window has a fixed size yet does not cover the whole X11 desktop, for example in multi-monitor setup.

STEPS TO REPRODUCE

Experimenting I refined the circumstances to reproduce this at will.

One way to make a fixed size window that does not cover the whole X11 desktop is:

Nearly any external monitor would be enough to reproduce the bug:

Geeqie side:

Expected

Observed

But often, some internal state causes the bug to appear again.

Example :

Another, striking example I have just now :

This suggests that geeqie caches information in several places and, when doing this cycle, fetches it from one place then the other then the first again. Surprising.

Additional information

Advanced analysis and hints

Internal screen is 1920x1080 pixels. External screen is 1200x1920 pixels (so, very tall). Total desktop is therefore in a rectangle of 3120x1920 pixels.

2848/1080 = 2.637037... ~ 2.64 is correct zoom ratio for a 1080-line window 2848/1920 = 1.483333... ~ 1.48 is the ratio that appears when bug occurs!

It looks like when the bug occurs, geeqie zooms the image to fit the total desktop (3210x1920 lines), and not the actual window dimensions (1920x1080 lines).

But the image window dimensions don't change, there is no window-related activity: bug is triggered by causing activity inside geeqie, for example keeping PageDown pressed.

Conclusion

fidergo-stephane-gourichon commented 3 years ago

I can't observe the problem any more, neither in 1.5.1, nor in latest master 955709e . I haven't change the hardware, only applied Ubuntu 20.04 update regularly. Perhaps the problem was in some dependency and was fixed there?

I guess we can close this, and reopen later if needed?

fidergo-stephane-gourichon commented 3 years ago

Woops, observed again with current master 1.6+git20210306-955709eb .

fidergo-stephane-gourichon commented 3 years ago

Hi @mowgli . As stated on https://github.com/BestImageViewer/geeqie/issues/786#issuecomment-792068830 the issue was observed again. Would you consider reopening? I'm willing to test fixes from any git branch.