GNOME Bugzilla – Bug 679794
Use "Built-in display" instead of "Laptop" as a default display name.
Last modified: 2013-03-04 09:43:16 UTC
Nowadays it is not only laptops will use those connectors. All-in-one PC will also use those connectors. I think "Built-in display" might be a more generic name.
Created attachment 218616 [details] [review] Patch from `git format-patch HEAD^`
We now (in GNOME 3.8) use the real output's name, instead of "Laptop". commit 5756c24ce001938ee195252c9d59a42f6cc2ebad Author: William Jon McCann <jmccann@redhat.com> Date: Thu Feb 14 11:23:18 2013 -0500 gnome-rr: make config use display name from output
I don't see any difference from the latest source code. It seems still to use "Laptop". From 5b199e659cbfb39efab6e70eecabbd297777dbf3 of gnome-desktop/libgnome-desktop/gnome-rr.c, <cite> const char * gnome_rr_output_get_display_name (GnomeRROutput *output) { g_return_val_if_fail (output != NULL, NULL); ensure_display_name (output); return output->display_name; } static void ensure_display_name (GnomeRROutput *output) { if (output->display_name != NULL) return; if (gnome_rr_output_is_laptop (output)) output->display_name = g_strdup (_("Laptop")); ... } gboolean gnome_rr_output_is_laptop (GnomeRROutput *output) { g_return_val_if_fail (output != NULL, FALSE); if (!output->connected) return FALSE; /* The ConnectorType property is present in RANDR 1.3 and greater */ if (g_strcmp0 (output->connector_type, GNOME_RR_CONNECTOR_TYPE_PANEL) == 0) return TRUE; /* Older versions of RANDR - this is a best guess, as @#$% RANDR doesn't have standard output names, * so drivers can use whatever they like. */ if (_gnome_rr_output_name_is_laptop (output->name)) return TRUE; return FALSE; } gboolean _gnome_rr_output_name_is_laptop (const char *name) { if (!name) return FALSE; if (strstr (name, "lvds") || /* Most drivers use an "LVDS" prefix... */ strstr (name, "LVDS") || strstr (name, "Lvds") || strstr (name, "LCD") || /* ... but fglrx uses "LCD" in some versions. Shoot me now, kthxbye. */ strstr (name, "eDP") || /* eDP is for internal laptop panel connections */ strstr (name, "default")) /* Finally, NVidia and all others that don't bother to do RANDR properly */ return TRUE; return FALSE; } </cite> LCD, LVDS, eDP, default are not only available on laptops but they may also be available on all-in-one PCs. But you can not call the display as "Laptop" on all-in-one PCs because they are not laptops.
Created attachment 237362 [details] [review] gnome-rr: Use "Built-in Display" for internal displays Instead of "Laptop" as all-in-ones, tablets, etc. are devices that will get detected as having internal displays, but aren't laptops.
@Bastien, Could you also modify the function names of _gnome_rr_output_name_is_laptop and gnome_rr_output_is_laptop to another proper one?
(In reply to comment #5) > @Bastien, > > Could you also modify the function names of _gnome_rr_output_name_is_laptop and > gnome_rr_output_is_laptop to another proper one? Not just before the stable release. We're already API-frozen.
Comment on attachment 218616 [details] [review] Patch from `git format-patch HEAD^` Attachment 218616 [details] pushed as b3b1d5f - gnome-rr: Use "Built-in Display" for internal displays
Attachment 237362 [details] pushed as 4c11dc6 - gnome-rr: Use "Built-in Display" for internal displays