From e976137d9780772bdc74105774acf6306328789f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 30 Jul 2021 13:47:42 +0200 Subject: [PATCH] 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: --- 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 cf8755c4a..ce02103f1 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