monitor-manager: Clean up DPMS state tracking
DPMS is configured from a bit all over the place: via D-Bus, via X11 and when reading the current KMS state. Each of these places did it slightly differently, directly poking at the field in MetaMonitorManager. To make things a bit more managable, move the field into a new MetaMonitorManagerPrivate, and add helpers to get and set the current value. Prior to this, there were for example situations where the DPMS setting was changed, but without signal listeners being notified about it. https://gitlab.gnome.org/GNOME/mutter/merge_requests/506
This commit is contained in:
@ -1766,9 +1766,11 @@ power_save_mode_changed_cb (MetaMonitorManager *manager,
|
||||
ClutterInputDevice *device;
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
MetaMonitor *builtin;
|
||||
MetaPowerSave power_save_mode;
|
||||
gboolean on;
|
||||
|
||||
on = (manager->power_save_mode == META_POWER_SAVE_ON);
|
||||
power_save_mode = meta_monitor_manager_get_power_save_mode (manager);
|
||||
on = power_save_mode == META_POWER_SAVE_ON;
|
||||
priv = meta_input_settings_get_instance_private (user_data);
|
||||
|
||||
builtin = meta_monitor_manager_get_laptop_panel (manager);
|
||||
|
Reference in New Issue
Block a user