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