summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2020-06-11 19:43:19 +0200
committerCarlos Garnacho <carlosg@gnome.org>2020-09-05 07:25:02 +0000
commitbb0712077a384400f6940aa245848213c5e47eb7 (patch)
tree40bfa2ba739634d8fe303ad109da2a06fdb48eba
parent1acf7444731d1fec90ae07994a649377d402d3c8 (diff)
downloadmutter-bb0712077a384400f6940aa245848213c5e47eb7.tar.gz
backends: Check panel autorotation state before applying autorotation
So far, we've expected this signal to not happen whenever autorotation shouldn't apply (no accelerometer is a strong reason). In future commits we'll add further checks to this policy, so prevent autorotation to change the display configuration if the MetaOrientationManager signal happens but it should be ignored. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1311
-rw-r--r--src/backends/meta-monitor-manager.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c
index ee255ab74..35d8e6087 100644
--- a/src/backends/meta-monitor-manager.c
+++ b/src/backends/meta-monitor-manager.c
@@ -685,6 +685,9 @@ orientation_changed (MetaOrientationManager *orientation_manager,
GError *error = NULL;
MetaMonitorsConfig *config;
+ if (!manager->panel_orientation_managed)
+ return;
+
switch (meta_orientation_manager_get_orientation (orientation_manager))
{
case META_ORIENTATION_NORMAL: