[gnome-flashback] monitor-manager: update orientation based config when panel_orientation_managed changes



commit 104da51dd2e6a96a65fa38fc5463a61f66218697
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Sep 12 21:48:50 2021 +0300

    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.
    
    Based on mutter commit:
    https://gitlab.gnome.org/GNOME/mutter/-/commit/1b13f50582b3

 backends/gf-monitor-manager.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/backends/gf-monitor-manager.c b/backends/gf-monitor-manager.c
index dbcc097..06024fa 100644
--- a/backends/gf-monitor-manager.c
+++ b/backends/gf-monitor-manager.c
@@ -578,6 +578,10 @@ update_panel_orientation_managed (GfMonitorManager *self)
 
   gf_dbus_display_config_set_panel_orientation_managed (self->display_config,
                                                         panel_orientation_managed);
+
+  /* The orientation may have changed while it was unmanaged */
+  if (panel_orientation_managed)
+    handle_orientation_change (orientation_manager, self);
 }
 
 static void


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