xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Aug 9 07:17:09 UTC 2022


 randr/rrmonitor.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 190320795f0cbc31bcc60a5ab4d4519b5310de86
Author: JiangWu <wujiang at kylinos.cn>
Date:   Tue Aug 9 07:17:07 2022 +0000

    randr: Correctly get physical size for screen with RandR 1.5

diff --git a/randr/rrmonitor.c b/randr/rrmonitor.c
index e62bd484d..7b0bbfcd5 100644
--- a/randr/rrmonitor.c
+++ b/randr/rrmonitor.c
@@ -156,8 +156,8 @@ RRMonitorGetGeometry(RRMonitorPtr monitor, RRMonitorGeometryPtr geometry)
 
         /* Adjust physical sizes to account for total area */
         if (active_crtcs > 1 && first.box.x2 != first.box.x1 && first.box.y2 != first.box.y1) {
-            geometry->mmWidth = (this.box.x2 - this.box.x1) / (first.box.x2 - first.box.x1) * first.mmWidth;
-            geometry->mmHeight = (this.box.y2 - this.box.y1) / (first.box.y2 - first.box.y1) * first.mmHeight;
+            geometry->mmWidth = ((double)(geometry->box.x2 - geometry->box.x1) / (first.box.x2 - first.box.x1)) * first.mmWidth;
+            geometry->mmHeight = ((double)(geometry->box.y2 - geometry->box.y1) / (first.box.y2 - first.box.y1)) * first.mmHeight;
         }
     } else {
         *geometry = monitor->geometry;


More information about the xorg-commit mailing list