XQuartz: Use screenInfo.{width,height} instead of grabbing it from the first screen

Signed-off-by: Jeremy Huddleston Sequoia's avatarJeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit eda85290)
parent 67cc65ba
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment