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>
This commit is contained in:
Marco Trevisan (Treviño) 2021-07-23 03:58:51 +02:00 committed by Jonas Ådahl
parent 2289f56112
commit dbf5e38f03

View File

@ -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);