aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-08-28 14:07:02 +0200
committermarha <marha@users.sourceforge.net>2012-08-28 14:07:02 +0200
commit05d67ae9117e5157fd1a5175dde6d7e48caf4653 (patch)
tree601c92c99a901b165664df7482c7baf538d4d7c5 /xorg-server/dix
parentb3462c12542a69eeaa3fe90fddfbb15d30c18158 (diff)
downloadvcxsrv-05d67ae9117e5157fd1a5175dde6d7e48caf4653.tar.gz
vcxsrv-05d67ae9117e5157fd1a5175dde6d7e48caf4653.tar.bz2
vcxsrv-05d67ae9117e5157fd1a5175dde6d7e48caf4653.zip
fontconfig mesa xserver git update 28 Aug 2012
Diffstat (limited to 'xorg-server/dix')
-rw-r--r--xorg-server/dix/getevents.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c
index b3bb162ae..4e62507aa 100644
--- a/xorg-server/dix/getevents.c
+++ b/xorg-server/dix/getevents.c
@@ -1327,6 +1327,7 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type,
RawDeviceEvent *raw;
double screenx = 0.0, screeny = 0.0; /* desktop coordinate system */
double devx = 0.0, devy = 0.0; /* desktop-wide in device coords */
+ int sx, sy; /* for POINTER_SCREEN */
ValuatorMask mask;
ScreenPtr scr;
@@ -1369,8 +1370,11 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type,
/* valuators are in driver-native format (rel or abs) */
if (flags & POINTER_ABSOLUTE) {
- if (flags & POINTER_SCREEN) /* valuators are in screen coords */
+ if (flags & POINTER_SCREEN) { /* valuators are in screen coords */
+ sx = valuator_mask_get(&mask, 0);
+ sy = valuator_mask_get(&mask, 1);
scale_from_screen(pDev, &mask);
+ }
transformAbsolute(pDev, &mask);
clipAbsolute(pDev, &mask);
@@ -1388,6 +1392,18 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type,
/* valuators are in device coordinate system in absolute coordinates */
scale_to_desktop(pDev, &mask, &devx, &devy, &screenx, &screeny);
+
+ /* #53037 XWarpPointer's scaling back and forth between screen and
+ device may leave us with rounding errors. End result is that the
+ pointer doesn't end up on the pixel it should.
+ Avoid this by forcing screenx/screeny back to what the input
+ coordinates were.
+ */
+ if (flags & POINTER_SCREEN) {
+ screenx = sx;
+ screeny = sy;
+ }
+
scr = positionSprite(pDev, (flags & POINTER_ABSOLUTE) ? Absolute : Relative,
&mask, &devx, &devy, &screenx, &screeny);