summaryrefslogtreecommitdiff
path: root/src/backends/meta-input-settings.c
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2019-01-11 14:45:44 +0100
committerJonas Ådahl <jadahl@gmail.com>2019-04-02 13:49:59 +0000
commit4cae9b5b1132a61cbff7c4aaa2addf83efa5e4c6 (patch)
tree88eeb3b91de2e374ee4ff920ffd73e77bdf29194 /src/backends/meta-input-settings.c
parent72aeeb8c378836f7eb6132bafe83354eb6a8963a (diff)
downloadmutter-4cae9b5b1132a61cbff7c4aaa2addf83efa5e4c6.tar.gz
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
Diffstat (limited to 'src/backends/meta-input-settings.c')
-rw-r--r--src/backends/meta-input-settings.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backends/meta-input-settings.c b/src/backends/meta-input-settings.c
index 27e99b574..7b8df561a 100644
--- a/src/backends/meta-input-settings.c
+++ b/src/backends/meta-input-settings.c
@@ -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);