[mutter] monitor-manager-xrandr: Changing "max bpc" changes output assignment



commit d39137c63189775c23e962ef73a4bf41e7c29ca7
Author: Daniel van Vugt <daniel van vugt canonical com>
Date:   Fri Jun 10 16:34:01 2022 +0800

    monitor-manager-xrandr: Changing "max bpc" changes output assignment
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2412>

 src/backends/x11/meta-monitor-manager-xrandr.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
---
diff --git a/src/backends/x11/meta-monitor-manager-xrandr.c b/src/backends/x11/meta-monitor-manager-xrandr.c
index 5f1369d3d7..6c9a289bcc 100644
--- a/src/backends/x11/meta-monitor-manager-xrandr.c
+++ b/src/backends/x11/meta-monitor-manager-xrandr.c
@@ -274,6 +274,7 @@ is_output_assignment_changed (MetaOutput            *output,
   for (i = 0; i < n_output_assignments; i++)
     {
       MetaOutputAssignment *output_assignment = output_assignments[i];
+      unsigned int max_bpc;
 
       if (output_assignment->output != output)
         continue;
@@ -289,6 +290,17 @@ is_output_assignment_changed (MetaOutput            *output,
           output_assignment->is_underscanning)
         return TRUE;
 
+      if (meta_output_get_max_bpc (output, &max_bpc))
+        {
+          if (!output_assignment->has_max_bpc ||
+              max_bpc != output_assignment->max_bpc)
+            return TRUE;
+        }
+      else if (output_assignment->has_max_bpc)
+        {
+          return TRUE;
+        }
+
       output_is_found = TRUE;
     }
 


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