• Daniel Drake's avatar
    monitor-manager: use MonitorsConfig to track switch_config · 6267732b
    Daniel Drake authored
    When constructing MetaMonitorsConfig objects, store which type
    of switch_config they are for (or UNKNOWN if it is not such
    type of config).
    
    Stop unconditionally setting current_switch_config to UNKNOWN when
    handling monitors changed events. Instead, set it to the switch_config
    type stored in the MonitorsConfig in the codepath that updates logical
    state. In addition to being called in the hotplug case along the same
    code flow that generates monitors changed events, this is also called
    in the coldplug case where a secondary monitor was connected before
    mutter was started.
    
    When creating the default linear display config, create it as a
    switch_config so that internal state gets updated to represent
    linear mode when this config is used.
    
    The previous behaviour of unconditionally resetting current_switch_config
    to UNKNOWN was breaking the internal state machine for display config
    switching, causing misbehaviour in gnome-shell's switchMonitor UI when
    using display switch hotkeys. The lack of internal tracking when the
    displays are already in the default "Join Displays" linear mode was
    then causing the first display switch hotkey press to do nothing
    (it would attempt to select "Join Displays" mode, but that was already
    active).
    
    Fixes: #281
    !213
    6267732b
Name
Last commit
Last update
..
backends Loading commit data...
compositor Loading commit data...
core Loading commit data...
meta Loading commit data...
tests Loading commit data...
ui Loading commit data...
wayland Loading commit data...
x11 Loading commit data...
.cvsignore Loading commit data...
Makefile-tests.am Loading commit data...
Makefile.am Loading commit data...
libmutter.pc.in Loading commit data...
meta-enum-types.c.in Loading commit data...
meta-enum-types.h.in Loading commit data...
org.freedesktop.login1.xml Loading commit data...
org.gnome.Mutter.DisplayConfig.xml Loading commit data...
org.gnome.Mutter.IdleMonitor.xml Loading commit data...
org.gnome.Mutter.RemoteDesktop.xml Loading commit data...
org.gnome.Mutter.ScreenCast.xml Loading commit data...