After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 721674 - monitor: improve heuristic to determine display output name
monitor: improve heuristic to determine display output name
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2014-01-07 03:13 UTC by Cosimo Cecchi
Modified: 2014-01-09 11:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
monitor: improve heuristic to determine display output name (3.80 KB, patch)
2014-01-07 03:13 UTC, Cosimo Cecchi
committed Details | Review
monitor: Suppress -Werror=unused-variable (788 bytes, patch)
2014-01-09 10:56 UTC, Debarshi Ray
committed Details | Review

Description Cosimo Cecchi 2014-01-07 03:13:21 UTC
This fixes some edge cases with the current display name heuristics.
Comment 1 Cosimo Cecchi 2014-01-07 03:13:23 UTC
Created attachment 265494 [details] [review]
monitor: improve heuristic to determine display output name

Under some circumstances, for example when the display controller driver
doesn't report back the correct EDID, or under VirtualBox, Mutter
returns suboptimal strings for an output display name, leading to funny
labels like 'Unknown 0"', or '(null) 0"' in the Settings panel.

This commit improves our heuristic in three ways:
- we now avoid putting inches in the display name if either dimension is
  zero
- we use the vendor name in case we're not able to lookup its PnP id
  from the database. Previously we would have passed over '(null)'
- as a special edge-case, when neither inches nor vendor are known, we
  use the string 'Unknown Display'

Finally, we make the combined vendor + inches string translatable, as
different languages might want to move the size part of the string to a
position different than the end.
Comment 2 Jasper St. Pierre (not reading bugmail) 2014-01-07 03:44:45 UTC
Review of attachment 265494 [details] [review]:

Looks good.
Comment 3 Cosimo Cecchi 2014-01-07 17:48:41 UTC
Attachment 265494 [details] pushed as 477acdd - monitor: improve heuristic to determine display output name

Thanks, pushed to master.
Comment 4 Debarshi Ray 2014-01-09 10:56:03 UTC
Created attachment 265823 [details] [review]
monitor: Suppress -Werror=unused-variable

Broke the build for me.
Comment 5 Matthias Clasen 2014-01-09 10:58:22 UTC
Review of attachment 265823 [details] [review]:

looks fine