After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 630512 - Eog initial window size exceeds screen height
Eog initial window size exceeds screen height
Status: RESOLVED FIXED
Product: eog
Classification: Core
Component: image viewer
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: EOG Maintainers
EOG Maintainers
: 632395 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-09-24 13:24 UTC by Mahendra Tallur
Modified: 2013-11-03 14:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add more debug output (1.84 KB, patch)
2012-10-20 17:20 UTC, Felix Riemann
reviewed Details | Review
Output of eog build with patch provided by Felix (2.77 KB, text/plain)
2013-05-09 20:13 UTC, Leonardo Donelli
  Details
Possible bugfix patch (923 bytes, patch)
2013-05-09 21:55 UTC, Leonardo Donelli
needs-work Details | Review
Git version of the patch (1.34 KB, patch)
2013-05-09 23:59 UTC, Leonardo Donelli
none Details | Review

Description Mahendra Tallur 2010-09-24 13:24:25 UTC
As of 09-24-2010 (eog 2.31.92 / Ubuntu 10.10 beta), when opening a picture with eog, the window size always exceeds the screen height ; which makes it impossible to see its status bar without holding alt and moving the window.

Please note it does occur from a fresh install / blank home directory as well.

This bug was also reported on Launchpad : https://bugs.launchpad.net/ubuntu/+source/eog/+bug/646798
Comment 1 Claudio Saavedra 2010-09-24 15:00:05 UTC
screen size, picture dimensions?
Comment 2 Mahendra Tallur 2010-09-24 19:57:44 UTC
Screen size : 1920x1080
Picture dimensions : any as long as it doesn't fit in the screen and thus has to be enlarged automatically by eog.
Comment 3 Mahendra Tallur 2010-09-24 20:04:31 UTC
Hmm... I guess this bugreport should be closed as it seems to be related to Compiz, actually. I wonder why it only seems to affect eog though...

Really sorry for the inconvenience...
Comment 4 Mahendra Tallur 2010-10-06 20:51:16 UTC
I still wonder whether this is due to Compiz, Ubuntu or eog. Can anyone reproduce this issue ?
Comment 5 Felix Riemann 2010-10-19 15:12:19 UTC
*** Bug 632395 has been marked as a duplicate of this bug. ***
Comment 6 Felix Riemann 2010-10-19 15:16:05 UTC
So we have a second report of a Compiz desktop causing too large windows.

Can you give us some information about your Compiz settings (enabled plugins,...)? Would make it a bit easier for us to find the correct settings once we get our hands on a Compiz-Desktop, just in case it doesn't happen with default settings.
Comment 7 Mahendra Tallur 2010-10-19 15:25:31 UTC
Thanks for your reply, Felix. The bug does occur with the default Compiz settings in Ubuntu 10.10 (for instance, when creating a new profile).

I also tried to disable / re-enable each plugin one by one and it made no difference. (although compiz prevented me from disabling some essential plugins)

Please tell me if I can help !
Comment 8 Felix Riemann 2010-11-16 11:13:04 UTC
Resetting to UNCONFIRMED until we can find out what's wrong.
Comment 9 Mahendra Tallur 2010-12-13 15:05:00 UTC
Felix, do you need more feedback ? Some other persons do manage to reproduce this issue (https://bugs.launchpad.net/ubuntu/+source/eog/+bug/646798). I still encounter it every time (when displaying pictures bigger than the screen size, with a clean Ubuntu 10.10 AMD 64 install provided Compiz is enabled).

Please tell me if I can help fix this :)
cheers !
Comment 10 Robert Roth 2010-12-31 09:25:15 UTC
Found in a downstream report in Ubuntu (https://bugs.launchpad.net/ubuntu/+source/eog/+bug/695426), thought this might be helpful:

"Screen format = 16/10, eog opens at format 4/3 or so and therefore window height goes off-screen and picture too big.

The height of the opening EOG window should not be proportional to the window width. Instead, both the window's height and width should be derived from the screen's height and width and never exceed them."
Comment 11 Felix Riemann 2011-05-27 20:00:21 UTC
Just had a look at it in a Ubuntu VM (just a quick one as it doesn't run very good with 3D in the VM) and it appears that eog gets a bogus window size when using compiz. The size given for the window is supposed to be the same as the size of the part that shows the picture. That way the window doesn't get scaled down far enough. Not sure yet what's the cause of this though.
Comment 12 Ahmed Shams 2011-10-26 01:52:03 UTC
Hello Felix,
Someone confirmed it without compiz[1]:
"
confirmed on Maverick 64-bit without Compiz or any other compositing manager, installed latest system updates
" On 2011-03-26.
If it can help, Thanks.


________________
[1]: https://bugs.launchpad.net/hundredpapercuts/+bug/646798/comments/8
Comment 13 nodiscc 2012-07-28 14:22:49 UTC
This bug was reported against a version which is not supported any more. Developers are no longer working on this version so there will not be any bug fixes for it.
Can you please check again if the issue you reported here still happens in a recent version of GNOME and update this report by adding a comment and adjusting the 'Version' field?

Again thank you for reporting this and sorry that it could not be fixed for the version you originally used here.

Without feedback this report will be closed as INCOMPLETE after 6 weeks.
Comment 14 Robert Roth 2012-07-28 20:32:45 UTC
Confirmed downstream at Ubuntu [1] with EOG 3.4.2 [2]:
[1] https://bugs.launchpad.net/ubuntu/+source/eog/+bug/646798
[2] https://launchpadlibrarian.net/109242817/eog_bug_precise.png
Comment 15 nodiscc 2012-07-28 21:34:00 UTC
Thanks Robert. Updating version for this bug
Comment 16 Felix Riemann 2012-10-20 17:20:17 UTC
Created attachment 226901 [details] [review]
Add more debug output

As I cannot reproduce it, it would be nice if someone who can reproduce it and is able to compile eog on his own, apply this patch and run eog with debug output enabled.

- Apply this patch
- Build eog
- Run eog with EOG_DEBUG_WINDOW=1 set
- Check that the bug occured
- Attach the produced output

Thanks!
Comment 17 Leonardo Donelli 2013-05-09 20:13:34 UTC
Created attachment 243733 [details]
Output of eog build with patch provided by Felix

I've builded eog 3.6.2 with the patch you provided. I attached the output (the EOG-CRITICAL always happen, even with normal build, when closing the window).
Sorry I'm late :)
Comment 18 Leonardo Donelli 2013-05-09 21:55:16 UTC
Created attachment 243743 [details] [review]
Possible bugfix patch

Well, I went ahead and created a patch. Tested on my system (Ubuntu 13.04) and it works.
Now the image size is 3/4 of the screen width and <= 3/4 of the screen height, or viceversa, depending on the screen and image format. (I think that was the coder intention when he put there a 0.75 when calculating the factor)
Comment 19 Timothy Arceri 2013-05-09 22:13:54 UTC
This patch makes sense to me, good work Leonardo. Hopefully Felix can get to it soon.
Comment 20 Timothy Arceri 2013-05-09 22:29:57 UTC
Review of attachment 243743 [details] [review]:

Two small issues.

1. Line 1244 has white spaces please remove them. In most Gnome/open source projects extra white spaces are a no no.

2. It looks like you created the patch using diff. You should use git to create the patch, that way you will get your name in the commit and also you can add the fix description and bug number please see: https://live.gnome.org/GnomeLove/SubmittingPatches
Comment 21 Leonardo Donelli 2013-05-09 23:42:13 UTC
Thanks Timothy.
1) Ops, didn't notice the whitespaces
2) I created it using quilt, will recreate it using git

BTW,
For those who can't reproduce: try using this image:
http://pinkie.ponychan.net/chan/files/src/136745379914.png

Explanation: the bug happens when, having defined
IW = Image width
IH = Image height
SAR = Screen aspect ratio (width / height)

holds:
IH < IW < 3/4 * SAR * IH

You can see that when SAR=4/3 the bug never happens (it actually does because of panel and decorations, but it is marginal)

That explains the 3/4 in the source code: for 4:3 monitors, that assured the height was never too much for the monitor (again, not really because of decorations). It could be an option to change that 3/4 to the inverse of the SAR, but (once again) then there is the need of small modifications to take into account the space taken by possible panels and decorations. I feel that my solution is a good compromise.
Comment 22 Leonardo Donelli 2013-05-09 23:59:52 UTC
Created attachment 243751 [details] [review]
Git version of the patch

Followed Timothy pointers.
Sorry guys, I'm new :)
Comment 23 Felix Riemann 2013-05-10 12:52:03 UTC
Thanks a lot guys. The fix indeed makes sense.
Applied in gnome-3-8 and master.

commit 3624b85895ef4ef2c840e4c84cf2fef0b35625bc
Author: Leonardo Donelli <>
Date:   Fri May 10 01:47:37 2013 +0200

    Set better window size
    
    Make sure the window is not too big for the screen size.
    The previous version did that in a way that didn't work
    with some images size, particularly on 16:9 displays.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=630512


Additionally I increased the initial size limit to 85% as it makes much better use of the available screen IMHO.

commit e08c9d44b0c0cd36674ffd4cac9a473a68018f8e
Author: Felix Riemann <>
Date:   Fri May 10 14:42:33 2013 +0200

    Raise initial window size limit to 85% of screen size
    
    This makes much better use of the available screen space.
---
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.
Comment 24 Øyvind Stegard 2013-11-03 11:24:34 UTC
I get too small initial window size on Ubuntu 13.10 with eog 3.8.2, causing scaling on rather small images. I reported the bug here:
https://bugs.launchpad.net/ubuntu/+source/eog/+bug/1247564

Related to fix for this bug ?
Comment 25 Felix Riemann 2013-11-03 14:47:03 UTC
Øyvind, your problem is more likely related to bug 690236.
Comment 26 Øyvind Stegard 2013-11-03 14:53:01 UTC
(In reply to comment #25)
> Øyvind, your problem is more likely related to bug 690236.

Thanks, yes, I'll add that one as upstream report in Launchpad.