[mutter] monitor-config-manager: Ignore orientation if it is not managed



commit dbf5e38f03f5b2c388f402eda5e432ea9f5ca0a8
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Fri Jul 23 03:58:51 2021 +0200

    monitor-config-manager: Ignore orientation if it is not managed
    
    When creating a configuration taking orientation into account we're using
    the sensors orientation even if this is currently not used (for example
    when an accelerator is available, but there's no touch screen).
    
    This would cause to have a different behavior when configuration is
    created and when we're loading a known configuration on startup.
    
    So always honor whether the monitor's orientation is managed or not.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1233>

 src/backends/meta-monitor-config-manager.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/backends/meta-monitor-config-manager.c b/src/backends/meta-monitor-config-manager.c
index f905983d5b..15972d1f84 100644
--- a/src/backends/meta-monitor-config-manager.c
+++ b/src/backends/meta-monitor-config-manager.c
@@ -704,7 +704,8 @@ get_monitor_transform (MetaMonitorManager *monitor_manager,
   MetaOrientationManager *orientation_manager;
   MetaBackend *backend;
 
-  if (!meta_monitor_is_laptop_panel (monitor))
+  if (!meta_monitor_is_laptop_panel (monitor) ||
+      !meta_monitor_manager_get_panel_orientation_managed (monitor_manager))
     return META_MONITOR_TRANSFORM_NORMAL;
 
   backend = meta_monitor_manager_get_backend (monitor_manager);


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