aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-24 08:59:35 +0100
committermarha <marha@users.sourceforge.net>2012-01-24 08:59:35 +0100
commite3a6ca7bffc785a13361efdbf81ef4776c050df0 (patch)
tree2277a7dccab07794bd37b255ae6b5e2716e0c855 /xorg-server/dix
parent780fcf7fcf5701c79568c95f32823cfa8e564665 (diff)
parentb683b8f5675e280a6dd4ab82d6b9394182798b55 (diff)
downloadvcxsrv-e3a6ca7bffc785a13361efdbf81ef4776c050df0.tar.gz
vcxsrv-e3a6ca7bffc785a13361efdbf81ef4776c050df0.tar.bz2
vcxsrv-e3a6ca7bffc785a13361efdbf81ef4776c050df0.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/dix/grabs.c
Diffstat (limited to 'xorg-server/dix')
-rw-r--r--xorg-server/dix/getevents.c17
-rw-r--r--xorg-server/dix/grabs.c3
2 files changed, 15 insertions, 5 deletions
diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c
index f1aa7f01a..53030ffd5 100644
--- a/xorg-server/dix/getevents.c
+++ b/xorg-server/dix/getevents.c
@@ -1857,7 +1857,7 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
default:
return 0;
}
- if (!(flags & TOUCH_CLIENT_ID))
+ if (t->mode == XIDirectTouch && !(flags & TOUCH_CLIENT_ID))
{
if (!valuator_mask_isset(&mask, 0))
valuator_mask_set_double(&mask, 0, valuator_mask_get_double(touchpoint.ti->valuators, 0));
@@ -1888,15 +1888,24 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
if (need_rawevent)
set_raw_valuators(raw, &mask, raw->valuators.data);
- scr = scale_to_desktop(dev, &mask, &devx, &devy, &screenx, &screeny);
+ /* Indirect device touch coordinates are not used for cursor positioning.
+ * They are merely informational, and are provided in device coordinates.
+ * The device sprite is used for positioning instead, and it is already
+ * scaled. */
+ if (t->mode == XIDirectTouch)
+ scr = scale_to_desktop(dev, &mask, &devx, &devy, &screenx, &screeny);
if (emulate_pointer)
scr = positionSprite(dev, Absolute, &mask,
&devx, &devy, &screenx, &screeny);
/* see fill_pointer_events for coordinate systems */
- updateHistory(dev, &mask, ms);
+ if (emulate_pointer)
+ updateHistory(dev, &mask, ms);
+
clipValuators(dev, &mask);
- storeLastValuators(dev, &mask, 0, 1, devx, devy);
+
+ if (emulate_pointer)
+ storeLastValuators(dev, &mask, 0, 1, devx, devy);
event->root = scr->root->drawable.id;
diff --git a/xorg-server/dix/grabs.c b/xorg-server/dix/grabs.c
index a6351b6e4..710fcb86c 100644
--- a/xorg-server/dix/grabs.c
+++ b/xorg-server/dix/grabs.c
@@ -194,7 +194,8 @@ UngrabAllDevices(Bool kill_client)
PrintDeviceGrabInfo(dev);
client = clients[CLIENT_ID(dev->deviceGrab.grab->resource)];
dev->deviceGrab.DeactivateGrab(dev);
- if (kill_client) CloseDownClient(client);
+ if (kill_client)
+ CloseDownClient(client);
}
ErrorF("End list of ungrabbed devices\n");