From eda85290ae47d8dd497ef9335d10268bbe3e02a0 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 19 Apr 2012 16:20:30 -0700 Subject: [PATCH] XQuartz: Use screenInfo.{width,height} instead of grabbing it from the first screen Signed-off-by: Jeremy Huddleston --- hw/xquartz/darwinEvents.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c index 9fc23a31b..25f011be9 100644 --- a/hw/xquartz/darwinEvents.c +++ b/hw/xquartz/darwinEvents.c @@ -504,8 +504,8 @@ DarwinSendTabletEvents(DeviceIntPtr pDev, int ev_type, int ev_button, pointer_y = 0.0; /* Adjust our pointer location to the [0,1] range */ - pointer_x = pointer_x / (double)screenInfo.screens[0]->width; - pointer_y = pointer_y / (double)screenInfo.screens[0]->height; + pointer_x = pointer_x / (double)screenInfo.width; + pointer_y = pointer_y / (double)screenInfo.height; valuator_mask_zero(&valuators); valuator_mask_set_double(&valuators, 0, XQUARTZ_VALUATOR_LIMIT * pointer_x);