[gnome-settings-daemon/gnome-3-14] xrandr: Don't check for hi-dpi on	monitors with broken EDID
- From: Rui Matos <rtcm src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gnome-settings-daemon/gnome-3-14] xrandr: Don't check for hi-dpi on	monitors with broken EDID
 
- Date: Tue, 11 Nov 2014 15:45:05 +0000 (UTC)
 
commit b43d661bfed0250a40252f63d91ef25ab06c23b2
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Oct 30 11:26:24 2014 +0100
    xrandr: Don't check for hi-dpi on monitors with broken EDID
    
    If the monitor reports a width/height that looks suspiciously like an
    aspect ratio (16/9 or 16/10) don't check for hi-dpi. We can assume that
    makers of devices that do support hi-dpi aren't so careless.
    
    See http://cgit.freedesktop.org/~daniels/xserver/commit/?h=lodpi
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738748
 plugins/xsettings/gsd-xsettings-manager.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/plugins/xsettings/gsd-xsettings-manager.c b/plugins/xsettings/gsd-xsettings-manager.c
index 4d4698d..489021c 100644
--- a/plugins/xsettings/gsd-xsettings-manager.c
+++ b/plugins/xsettings/gsd-xsettings-manager.c
@@ -599,6 +599,14 @@ get_window_scale (GnomeXSettingsManager *manager)
                 if (height < HIDPI_MIN_HEIGHT)
                         goto out;
 
+                /* Somebody encoded the aspect ratio (16/9 or 16/10)
+                 * instead of the physical size */
+                if ((width_mm == 160 && height_mm == 90) ||
+                    (width_mm == 160 && height_mm == 100) ||
+                    (width_mm == 16 && height_mm == 9) ||
+                    (width_mm == 16 && height_mm == 10))
+                        goto out;
+
                 window_scale = 1;
                 if (width_mm > 0 && height_mm > 0) {
                         dpi_x = (double)width / (width_mm / 25.4);
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]