[mutter] wayland: Don't check for hi-dpi on monitors with broken EDID



commit 13b6bd20caaf1c4d2d13c688c18ac4ce31a8721f
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Oct 30 17:36:26 2014 +0100

    wayland: 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=734839

 src/wayland/meta-wayland-outputs.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/wayland/meta-wayland-outputs.c b/src/wayland/meta-wayland-outputs.c
index 90990e6..7ed3ae1 100644
--- a/src/wayland/meta-wayland-outputs.c
+++ b/src/wayland/meta-wayland-outputs.c
@@ -75,6 +75,14 @@ compute_scale (MetaOutput *output)
       output->crtc->rect.width >= SMALLEST_4K_WIDTH)
     goto out;
 
+  /* Somebody encoded the aspect ratio (16/9 or 16/10)
+   * instead of the physical size */
+  if ((output->width_mm == 160 && output->height_mm == 90) ||
+      (output->width_mm == 160 && output->height_mm == 100) ||
+      (output->width_mm == 16 && output->height_mm == 9) ||
+      (output->width_mm == 16 && output->height_mm == 10))
+    goto out;
+
   if (output->width_mm > 0 && output->height_mm > 0)
     {
       double dpi_x, dpi_y;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]