aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/touch.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-12-03 09:09:06 +0100
committermarha <marha@users.sourceforge.net>2012-12-03 09:09:06 +0100
commitb8da71ffb17d3d16706db04115e9ba1dd8bc49b9 (patch)
tree52bf0a78e9db0a4eff7b3dbb7c3a036c01504f6a /xorg-server/dix/touch.c
parentd2d73da59e64acdc4718e4e6790a69d967bee875 (diff)
downloadvcxsrv-b8da71ffb17d3d16706db04115e9ba1dd8bc49b9.tar.gz
vcxsrv-b8da71ffb17d3d16706db04115e9ba1dd8bc49b9.tar.bz2
vcxsrv-b8da71ffb17d3d16706db04115e9ba1dd8bc49b9.zip
fontconfig mesa xserver pixman xkeyboard-config git update 3 dec 2012
fontconfig: 2442d611579bccb84f0c29e3f9ceb0a7436df812 mesa: 54ff536823bf5a431efe1f2becdb21174c146948 xserver: b51a1bd2766e7dc975ca8f1cacc3f8bd0e1a68a3 pixman: 978bab253d1d061b00b5e80aa45ab6986aac466f xkeyboard-config: 05dcc6db64cd7425aea6d22efd6a3ecf34dbddd2
Diffstat (limited to 'xorg-server/dix/touch.c')
-rw-r--r--xorg-server/dix/touch.c61
1 files changed, 27 insertions, 34 deletions
diff --git a/xorg-server/dix/touch.c b/xorg-server/dix/touch.c
index 5f77be575..29ba17194 100644
--- a/xorg-server/dix/touch.c
+++ b/xorg-server/dix/touch.c
@@ -463,45 +463,14 @@ TouchEventHistoryPush(TouchPointInfoPtr ti, const DeviceEvent *ev)
void
TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev, XID resource)
{
- InternalEvent *tel;
- ValuatorMask *mask;
- int i, nev;
- int flags;
+ int i;
if (!ti->history)
return;
- tel = InitEventList(GetMaximumEventsNum());
- mask = valuator_mask_new(0);
-
- valuator_mask_set_double(mask, 0, ti->history[0].valuators.data[0]);
- valuator_mask_set_double(mask, 1, ti->history[0].valuators.data[1]);
-
- flags = TOUCH_CLIENT_ID | TOUCH_REPLAYING;
- if (ti->emulate_pointer)
- flags |= TOUCH_POINTER_EMULATED;
- /* Generate events based on a fake touch begin event to get DCCE events if
- * needed */
- /* FIXME: This needs to be cleaned up */
- nev = GetTouchEvents(tel, dev, ti->client_id, XI_TouchBegin, flags, mask);
- for (i = 0; i < nev; i++) {
- /* Send saved touch begin event */
- if (tel[i].any.type == ET_TouchBegin) {
- DeviceEvent *ev = &ti->history[0];
- ev->flags |= TOUCH_REPLAYING;
- DeliverTouchEvents(dev, ti, (InternalEvent*)ev, resource);
- }
- else {/* Send DCCE event */
- tel[i].any.time = ti->history[0].time;
- DeliverTouchEvents(dev, ti, tel + i, resource);
- }
- }
-
- valuator_mask_free(&mask);
- FreeEventList(tel, GetMaximumEventsNum());
+ TouchDeliverDeviceClassesChangedEvent(ti, ti->history[0].time, resource);
- /* First event was TouchBegin, already replayed that one */
- for (i = 1; i < ti->history_elements; i++) {
+ for (i = 0; i < ti->history_elements; i++) {
DeviceEvent *ev = &ti->history[i];
ev->flags |= TOUCH_REPLAYING;
@@ -509,6 +478,30 @@ TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev, XID resource)
}
}
+void
+TouchDeliverDeviceClassesChangedEvent(TouchPointInfoPtr ti, Time time,
+ XID resource)
+{
+ DeviceIntPtr dev;
+ int num_events = 0;
+ InternalEvent dcce;
+
+ dixLookupDevice(&dev, ti->sourceid, serverClient, DixWriteAccess);
+
+ if (!dev)
+ return;
+
+ /* UpdateFromMaster generates at most one event */
+ UpdateFromMaster(&dcce, dev, DEVCHANGE_POINTER_EVENT, &num_events);
+ BUG_WARN(num_events > 1);
+
+ if (num_events) {
+ dcce.any.time = time;
+ /* FIXME: This doesn't do anything */
+ dev->public.processInputProc(&dcce, dev);
+ }
+}
+
Bool
TouchBuildDependentSpriteTrace(DeviceIntPtr dev, SpritePtr sprite)
{