diff options
author | Daniel Stone <daniel@fooishbar.org> | 2011-02-15 11:28:02 +0000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-02-17 09:40:59 +1000 |
commit | 46b49796015762fd131bec96eff6caaa890bfd5f (patch) | |
tree | 445a9342c3b76f208b1271d804fc2fbb6e155387 /record | |
parent | ea71495adabca52df44241c0eba39e6bceb58202 (diff) |
Input: Allow EventToCore to return multiple events
Some event types (notably Expose and GraphicsExpose) require multiple
events, a la XI 1.x. Bring the EventToCore API in line with EventToXI's
and allow it to generate multiple events.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'record')
-rw-r--r-- | record/record.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/record/record.c b/record/record.c index 6a93d7a5c..1168c43ac 100644 --- a/record/record.c +++ b/record/record.c @@ -804,6 +804,7 @@ RecordADeviceEvent(CallbackListPtr *pcbl, pointer nulldata, pointer calldata) RecordContextPtr pContext; RecordClientsAndProtocolPtr pRCAP; int eci; /* enabled context index */ + int count; for (eci = 0; eci < numEnabledContexts; eci++) { @@ -818,9 +819,11 @@ RecordADeviceEvent(CallbackListPtr *pcbl, pointer nulldata, pointer calldata) /* TODO check return values */ if (IsMaster(pei->device)) { - xEvent xE; - EventToCore(pei->event, &xE); - RecordSendProtocolEvents(pRCAP, pContext, &xE, 1); + xEvent *core_events; + EventToCore(pei->event, &core_events, &count); + RecordSendProtocolEvents(pRCAP, pContext, core_events, + count); + free(core_events); } EventToXI(pei->event, &xi_events, &count); |