[mutter] monitor-manager: Only manage orientation if we have a built in panel



commit e976137d9780772bdc74105774acf6306328789f
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Fri Jul 30 13:47:42 2021 +0200

    monitor-manager: Only manage orientation if we have a built in panel
    
    All the auto-rotation code is expecting to have a built-in panel, but we
    still monitor accelerometer changes if we don't have one (uncommon, but
    possible).
    
    Thus manage the panel orientation in such case and update it on monitors
    changes.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1233>

 src/backends/meta-monitor-manager.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c
index cf8755c4ae..ce02103f15 100644
--- a/src/backends/meta-monitor-manager.c
+++ b/src/backends/meta-monitor-manager.c
@@ -955,7 +955,8 @@ update_panel_orientation_managed (MetaMonitorManager *manager)
 
   panel_orientation_managed =
     (clutter_seat_get_touch_mode (seat) &&
-     meta_orientation_manager_has_accelerometer (orientation_manager));
+     meta_orientation_manager_has_accelerometer (orientation_manager) &&
+     meta_monitor_manager_get_laptop_panel (manager));
 
   if (manager->panel_orientation_managed == panel_orientation_managed)
     return;
@@ -3076,6 +3077,8 @@ rebuild_monitors (MetaMonitorManager *manager)
                                          monitor_normal);
 
     }
+
+  update_panel_orientation_managed (manager);
 }
 
 void


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