[gnome-flashback] backends: take panel-orientation into account for physical size



commit 179c6dab2f9ce3c94865f8c946e3b4005516c010
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Tue Jul 16 20:07:25 2019 +0300

    backends: take panel-orientation into account for physical size
    
    Based on mutter commit:
    https://gitlab.gnome.org/GNOME/mutter/commit/0bbda3ad87257f0c64a2

 backends/gf-output-xrandr.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/backends/gf-output-xrandr.c b/backends/gf-output-xrandr.c
index 60a0f51..023b6f9 100644
--- a/backends/gf-output-xrandr.c
+++ b/backends/gf-output-xrandr.c
@@ -767,14 +767,23 @@ gf_create_xrandr_output (GfGpuXrandr   *gpu_xrandr,
   gf_output_parse_edid (output, edid);
   g_bytes_unref (edid);
 
-  output->width_mm = xrandr_output->mm_width;
-  output->height_mm = xrandr_output->mm_height;
   output->hotplug_mode_update = output_get_hotplug_mode_update (output);
   output->suggested_x = output_get_suggested_x (output);
   output->suggested_y = output_get_suggested_y (output);
   output->connector_type = output_get_connector_type (output);
   output->panel_orientation_transform = output_get_panel_orientation_transform (output);
 
+  if (gf_monitor_transform_is_rotated (output->panel_orientation_transform))
+    {
+      output->width_mm = xrandr_output->mm_height;
+      output->height_mm = xrandr_output->mm_width;
+    }
+  else
+    {
+      output->width_mm = xrandr_output->mm_width;
+      output->height_mm = xrandr_output->mm_height;
+    }
+
   output_get_tile_info (output);
   output_get_modes (output, xrandr_output);
   output_get_crtcs (output, xrandr_output);


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