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 669537 - Monitor size rounded up in Display (16" instead of 15.6")
Monitor size rounded up in Display (16" instead of 15.6")
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Display
2.28.x
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-02-07 06:42 UTC by Jeffrey Cheung
Modified: 2012-05-17 17:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jeffrey Cheung 2012-02-07 06:42:36 UTC
We found that Gnome Display Manager always show 15.6" monitor size as 16".

Checking the logic below how gnome display manager calculate the size of the monitor:

if (width_mm != -1 && height_mm != -1)
{
    double d = sqrt (width_mm * width_mm + height_mm * height_mm);

    inches = (int)(d / 25.4 + 0.5);
}

The width of the monitor is 344mm, and the height is 194mm, and then the
diagonal is sqrt((344^2) + (194^2)) = 394.932906mm

inches = 394.932906 / 25.4 + 0.5 = 16.0485396 = 16

Thus, 15.6" will always be rounded up to 16".
Comment 1 André Klapper 2012-02-07 09:25:37 UTC
Which exact GNOME version is this about? Would be nice to set in the "Version" field when reporting bugs. Thanks!
Comment 2 Jeffrey Cheung 2012-02-07 09:33:15 UTC
Sorry, the version is 2.28.

I know that for gnome 3.x, gnome display manager no longer display the size of  internal monitor.

Just wonder to know if you guys still maintain 2.28 or up ?
Comment 3 Bastien Nocera 2012-02-07 11:03:03 UTC
(In reply to comment #2)
> Just wonder to know if you guys still maintain 2.28 or up ?

No.
Comment 4 Bastien Nocera 2012-05-17 17:02:34 UTC
Fixed in gnome-desktop (where the code lives now).

commit 2ed4f948b8b1c7cdbcbe0ed82dc11179df5fa176
Author: Bastien Nocera <hadess@hadess.net>
Date:   Thu May 17 17:57:41 2012 +0100

    gnome-rr: Better display dimensions in names
    
    For a small number of displays, we know the size it's sold as,
    so make 15.6" displays show up as 15.6", not 16.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=669537