Skip to content
  • Jonas Ådahl's avatar
    monitor-manager: compare keys when checking whether a config is complete · b7afc0ac
    Jonas Ådahl authored and Alberts Muktupāvels's avatar Alberts Muktupāvels committed
    We only counted configured monitors and whether the config was
    applicable (could be assigned), howeverwe didn't include disabled
    monitors when comparing. This could caused incorrect configurations to
    be applied when trying to use the previous configuration.
    
    One scenario where this happened was one a system with one laptop
    screen and one external monitor that was hot plugged some point after
    start up. When the laptop lid was closed, the 'previous configuration'
    being the configuration where only the laptop panel was enabled, passed
    'is-complete' check as the number of configured monitors were correct,
    and the configuration was applicable.
    
    Avoid this issue by simply comparing the configuration key of the
    previous configuration and the configuration key of the current state.
    This correctly identifies a laptop panel with the lid closed as
    inaccessible, thus doesn't incorrectly revert to the previous
    configuration.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=788915
    b7afc0ac