[gnome-settings-daemon] xrandr: Don't check for hi-dpi on monitors with broken EDID
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] xrandr: Don't check for hi-dpi on monitors with broken EDID
- Date: Thu, 30 Oct 2014 16:40:14 +0000 (UTC)
commit 1356fe5eaf51eecad6c107a3fe1badf2f6eb63f5
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]