Blob Blame History Raw
From a9fd4e7dccc0d32649fae5ea952b168667bafa87 Mon Sep 17 00:00:00 2001
From: Richard Hughes <richard@hughsie.com>
Date: Mon, 16 May 2016 12:56:45 +0100
Subject: [PATCH] color: Ignore fake VNC devices

Resolves: https://bugzilla.gnome.org/show_bug.cgi?id=766553
---
 plugins/color/gsd-color-state.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/plugins/color/gsd-color-state.c b/plugins/color/gsd-color-state.c
index 061e414..9f8308f 100644
--- a/plugins/color/gsd-color-state.c
+++ b/plugins/color/gsd-color-state.c
@@ -970,6 +970,7 @@ gcm_session_add_state_output (GsdColorState *state, GnomeRROutput *output)
 {
         const gchar *edid_checksum = NULL;
         const gchar *model = NULL;
+        const gchar *output_name = NULL;
         const gchar *serial = NULL;
         const gchar *vendor = NULL;
         gboolean ret;
@@ -979,6 +980,13 @@ gcm_session_add_state_output (GsdColorState *state, GnomeRROutput *output)
         GHashTable *device_props = NULL;
         GsdColorStatePrivate *priv = state->priv;
 
+        /* VNC creates a fake device that cannot be color managed */
+        output_name = gnome_rr_output_get_name (output);
+        if (output_name != NULL && g_str_has_prefix (output_name, "VNC-")) {
+                g_debug ("ignoring %s as fake VNC device detected", output_name);
+                return;
+        }
+
         /* try to get edid */
         edid = gcm_session_get_output_edid (state, output, &error);
         if (edid == NULL) {
-- 
2.7.4