[gnome-flashback] monitor-manager: fix orientation changes on devices with 90° mounted panels



commit abe20afe17bbe3132709017d893eb0e462a50648
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sat Aug 13 14:09:08 2022 +0300

    monitor-manager: fix orientation changes on devices with 90° mounted panels
    
    Based on mutter commit:
    https://gitlab.gnome.org/GNOME/mutter/-/commit/cc9bb7c516c5fd2ab48b66934538cc7a60e6a84a

 backends/gf-monitor-manager.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/backends/gf-monitor-manager.c b/backends/gf-monitor-manager.c
index d2d16d2..36886bc 100644
--- a/backends/gf-monitor-manager.c
+++ b/backends/gf-monitor-manager.c
@@ -603,6 +603,7 @@ handle_orientation_change (GfOrientationManager *orientation_manager,
 {
   GfOrientation orientation;
   GfMonitorTransform transform;
+  GfMonitorTransform panel_transform;
   GError *error = NULL;
   GfMonitorsConfig *config;
   GfMonitor *laptop_panel;
@@ -619,7 +620,9 @@ handle_orientation_change (GfOrientationManager *orientation_manager,
   transform = gf_monitor_transform_from_orientation (orientation);
 
   laptop_logical_monitor = gf_monitor_get_logical_monitor (laptop_panel);
-  if (gf_logical_monitor_get_transform (laptop_logical_monitor) == transform)
+  panel_transform = gf_monitor_crtc_to_logical_transform (laptop_panel, transform);
+
+  if (gf_logical_monitor_get_transform (laptop_logical_monitor) == panel_transform)
     return;
 
   current_config = gf_monitor_config_manager_get_current (manager->config_manager);


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