monitor-manager-kms: Use the output naming logic used by the X server
Switch to the output naming logic used by the X server's modesetting driver which, in particular, uses drmModeConnector's connector_type_id instead of connector_id. The kernel generates new connector_id's every time there are changes which means we can't identify the same monitor on the same connector after an hardware hotplug. Switching to connector_type_id fixes this. https://bugzilla.gnome.org/show_bug.cgi?id=770338
This commit is contained in:
parent
7ba803934c
commit
c8f24721c5
1 changed files with 6 additions and 5 deletions
|
@ -155,14 +155,15 @@ make_output_name (drmModeConnector *connector)
|
|||
"Virtual",
|
||||
"DSI",
|
||||
};
|
||||
const char *connector_type_name;
|
||||
|
||||
if (connector->connector_type < G_N_ELEMENTS (connector_type_names))
|
||||
connector_type_name = connector_type_names[connector->connector_type];
|
||||
return g_strdup_printf ("%s-%d",
|
||||
connector_type_names[connector->connector_type],
|
||||
connector->connector_type_id);
|
||||
else
|
||||
connector_type_name = "unknown";
|
||||
|
||||
return g_strdup_printf ("%s%d", connector_type_name, connector->connector_id);
|
||||
return g_strdup_printf ("Unknown%d-%d",
|
||||
connector->connector_type,
|
||||
connector->connector_type_id);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue