[mutter] monitor-manager-native: Do not reload all the monitors on gamma-only change



commit 9ce3abad28abae7150fdb6150d6ccd2a243db29f
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Sun Mar 21 23:11:24 2021 +0100

    monitor-manager-native: Do not reload all the monitors on gamma-only change
    
    If only gamma changed on drm CRTC's we don't have to rebuild the whole
    monitors, nor to inform the backed about, the only consumer could be the
    DBus API, and so we still emit a signal, but nothing else is needed.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1964>

 src/backends/native/meta-monitor-manager-native.c | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/src/backends/native/meta-monitor-manager-native.c 
b/src/backends/native/meta-monitor-manager-native.c
index d76972df85..7b21625033 100644
--- a/src/backends/native/meta-monitor-manager-native.c
+++ b/src/backends/native/meta-monitor-manager-native.c
@@ -65,6 +65,8 @@
 #include "meta/main.h"
 #include "meta/meta-x11-errors.h"
 
+#include "meta-dbus-display-config.h"
+
 enum
 {
   PROP_0,
@@ -514,6 +516,12 @@ on_kms_resources_changed (MetaKms              *kms,
 {
   g_assert (changes != META_KMS_UPDATE_CHANGE_NONE);
 
+  if (changes == META_KMS_UPDATE_CHANGE_GAMMA)
+    {
+      meta_dbus_display_config_emit_monitors_changed (manager->display_config);
+      return;
+    }
+
   handle_hotplug_event (manager);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]