[mutter] monitor-manager: Use connector_type instead of name sniffing
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] monitor-manager: Use connector_type instead of name sniffing
- Date: Tue, 30 Dec 2014 01:15:37 +0000 (UTC)
commit c5940580ed5ffc9526e621163e67662c72bb5e1d
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Dec 29 17:13:25 2014 -0800
monitor-manager: Use connector_type instead of name sniffing
src/backends/meta-monitor-manager.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c
index c6d1682..5b97f62 100644
--- a/src/backends/meta-monitor-manager.c
+++ b/src/backends/meta-monitor-manager.c
@@ -344,11 +344,14 @@ make_display_name (MetaMonitorManager *manager,
char *vendor_name = NULL;
char *ret;
- if (g_str_has_prefix (output->name, "LVDS") ||
- g_str_has_prefix (output->name, "eDP"))
+ switch (output->connector_type)
{
+ case META_CONNECTOR_TYPE_LVDS:
+ case META_CONNECTOR_TYPE_eDP:
ret = g_strdup (_("Built-in display"));
goto out;
+ default:
+ break;
}
if (output->width_mm > 0 && output->height_mm > 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]