Skip to content
  • Cosimo Cecchi's avatar
    monitor: improve heuristic to determine display output name · 7b597b8c
    Cosimo Cecchi authored and Jasper St. Pierre's avatar Jasper St. Pierre committed
    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.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=721674
    7b597b8c