diff options
author | Hans de Goede <hdegoede@redhat.com> | 2020-10-15 12:22:53 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2020-10-18 21:35:09 +0000 |
commit | 1b13f50582b3e12232f1f9bf1686e2238d6e0da9 (patch) | |
tree | 1ffab860ab68b79c938afddeb53a10b8189a6b32 /src | |
parent | 4c1220836331b9442a54ff0ec9dfa5ab55ed91e3 (diff) | |
download | mutter-1b13f50582b3e12232f1f9bf1686e2238d6e0da9.tar.gz |
monitor-manager: Update orientation based config when panel_orientation_managed changes
The orientation reported by the orientation_manager may have changed while
panel_orientation_managed was false. So when panel_orientation_managed
changes to true we should re-check the orientation.
This fixes the orientation not being correct when e.g. taking a 360 degree
hinges 2-in-1 in clamshell mode (so landscape orientation) and then folding
it into tablet mode while holding it in portrait orientation.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1506
Diffstat (limited to 'src')
-rw-r--r-- | src/backends/meta-monitor-manager.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c index 18aeddcd9..0e2583b08 100644 --- a/src/backends/meta-monitor-manager.c +++ b/src/backends/meta-monitor-manager.c @@ -785,6 +785,10 @@ update_panel_orientation_managed (MetaMonitorManager *manager) meta_dbus_display_config_set_panel_orientation_managed (manager->display_config, manager->panel_orientation_managed); + + /* The orientation may have changed while it was unmanaged */ + if (panel_orientation_managed) + handle_orientation_change (orientation_manager, manager); } void |