Blame SOURCES/0001-common-Add-display-mapping-check-specific-for-the-De.patch

c0c25f
From 5abebf19fe8c09ec6e91027634b4c1727365b849 Mon Sep 17 00:00:00 2001
c0c25f
From: Carlos Garnacho <carlosg@gnome.org>
c0c25f
Date: Fri, 6 Sep 2019 20:48:20 +0200
c0c25f
Subject: [PATCH] common: Add display mapping check specific for the Dell
c0c25f
 Canvas.
c0c25f
c0c25f
---
c0c25f
 plugins/common/gsd-device-mapper.c | 14 +++++++++++++-
c0c25f
 1 file changed, 13 insertions(+), 1 deletion(-)
c0c25f
c0c25f
diff --git a/plugins/common/gsd-device-mapper.c b/plugins/common/gsd-device-mapper.c
c0c25f
index d4f7bc3..e5b5ea3 100644
c0c25f
--- a/plugins/common/gsd-device-mapper.c
c0c25f
+++ b/plugins/common/gsd-device-mapper.c
c0c25f
@@ -56,6 +56,7 @@ typedef enum {
c0c25f
 typedef enum {
c0c25f
 	GSD_PRIO_BUILTIN,            /* Output is builtin, applies mainly to system-integrated devices */
c0c25f
 	GSD_PRIO_MATCH_SIZE,	     /* Size from input device and output match */
c0c25f
+	GSD_PRIO_EDID_DELL_CANVAS,   /* EDID is Dell Canvas' */
c0c25f
 	GSD_PRIO_EDID_MATCH_FULL,    /* Full EDID model match, eg. "Cintiq 12WX" */
c0c25f
 	GSD_PRIO_EDID_MATCH_PARTIAL, /* Partial EDID model match, eg. "Cintiq" */
c0c25f
 	GSD_PRIO_EDID_MATCH_VENDOR,  /* EDID vendor match, eg. "WAC" for Wacom */
c0c25f
@@ -249,7 +250,7 @@ input_info_guess_candidates (GsdInputInfo  *input,
c0c25f
 			     GnomeRROutput *outputs[N_OUTPUT_PRIORITIES])
c0c25f
 {
c0c25f
 	gboolean found = FALSE;
c0c25f
-	const gchar *name;
c0c25f
+	const gchar *name, *vendor, *product;
c0c25f
 	gchar **split;
c0c25f
 	gint i;
c0c25f
 
c0c25f
@@ -261,6 +262,17 @@ input_info_guess_candidates (GsdInputInfo  *input,
c0c25f
 	}
c0c25f
 
c0c25f
 	split = g_strsplit (name, " ", -1);
c0c25f
+	gsd_device_get_device_ids (input->device, &vendor, &product);
c0c25f
+
c0c25f
+	if (input->capabilities & GSD_INPUT_IS_SCREEN_INTEGRATED &&
c0c25f
+	    g_strcmp0 (vendor, "2575") == 0 &&
c0c25f
+	    g_strcmp0 (product, "0204") == 0) {
c0c25f
+		const gchar *edid[3] = { "DEL", "Dell KV2718D", NULL };
c0c25f
+
c0c25f
+		outputs[GSD_PRIO_EDID_DELL_CANVAS] =
c0c25f
+			find_output_by_edid (input->mapper->rr_screen, edid);
c0c25f
+		found |= outputs[GSD_PRIO_EDID_DELL_CANVAS] != NULL;
c0c25f
+	}
c0c25f
 
c0c25f
 	/* On Wacom devices that are integrated on a not-in-system screen (eg. Cintiqs),
c0c25f
 	 * there is usually a minimal relation between the input device name and the EDID
c0c25f
-- 
c0c25f
2.23.0
c0c25f