monitor-config: Update laptop heuristics to match GnomeRROutput

gnome-desktop's GnomeRROutput class has heuristics to classify a display
as builtin similar to our own[0]. The two heuristics don't quite match
though, so different core components can end up with a different view
on the current display configuration. Minimize that risk by adding a
couple of rules that bring the two heuristics closer together.

[0] https://git.gnome.org/browse/gnome-desktop/tree/libgnome-desktop/gnome-rr.c#n1674

https://bugzilla.gnome.org/show_bug.cgi?id=765267
This commit is contained in:
Florian Müllner 2016-04-20 19:10:18 +02:00
parent ab6c008e3e
commit b6f11fa8b8
2 changed files with 5 additions and 0 deletions

View File

@ -913,6 +913,10 @@ key_is_laptop (MetaOutputKey *key)
{
/* FIXME: extend with better heuristics */
return g_str_has_prefix (key->connector, "LVDS") ||
g_str_has_prefix (key->connector, "lvds") ||
g_str_has_prefix (key->connector, "Lvds") ||
g_str_has_prefix (key->connector, "LCD") || /* some versions of fglrx, sigh */
g_str_has_prefix (key->connector, "DSI") ||
g_str_has_prefix (key->connector, "eDP");
}

View File

@ -1466,6 +1466,7 @@ meta_output_is_laptop (MetaOutput *output)
{
case META_CONNECTOR_TYPE_eDP:
case META_CONNECTOR_TYPE_LVDS:
case META_CONNECTOR_TYPE_DSI:
return TRUE;
default:
return FALSE;