summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-12-14 13:51:12 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-12-19 09:08:32 +1000
commit93c2a1628a9f6e7480d834bf55c080997fd18911 (patch)
tree87564347d84228e3160d44735078d690fb51bb79 /Xi
parent3390d3fc0347947796aa245d70fefecf59b7bfe4 (diff)
Hook up the ownership events
This patch applies most of the protocol conversions and the internal event type for ownership events. Note that ownership events are generated by the DIX only, they do not pass through the event queue. Co-authored-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Diffstat (limited to 'Xi')
-rw-r--r--Xi/extinit.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/Xi/extinit.c b/Xi/extinit.c
index 0b7bc3424..a81c8f1ff 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -829,6 +829,22 @@ static void SRawEvent(xXIRawEvent *from, xXIRawEvent *to)
swaps(&to->valuators_len);
}
+static void STouchOwnershipEvent(xXITouchOwnershipEvent *from,
+ xXITouchOwnershipEvent *to)
+{
+ *to = *from;
+ swaps(&to->sequenceNumber);
+ swapl(&to->length);
+ swaps(&to->evtype);
+ swaps(&to->deviceid);
+ swapl(&to->time);
+ swaps(&to->sourceid);
+ swapl(&to->touchid);
+ swapl(&to->flags);
+ swapl(&to->root);
+ swapl(&to->event);
+ swapl(&to->child);
+}
/** Event swapping function for XI2 events. */
void
@@ -863,6 +879,10 @@ XI2EventSwap(xGenericEvent *from, xGenericEvent *to)
case XI_TouchEnd:
SDeviceEvent((xXIDeviceEvent*)from, (xXIDeviceEvent*)to);
break;
+ case XI_TouchOwnership:
+ STouchOwnershipEvent((xXITouchOwnershipEvent*)from,
+ (xXITouchOwnershipEvent*)to);
+ break;
case XI_RawMotion:
case XI_RawKeyPress:
case XI_RawKeyRelease: