From 46b49796015762fd131bec96eff6caaa890bfd5f Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 15 Feb 2011 11:28:02 +0000 Subject: 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 Signed-off-by: Peter Hutterer --- record/record.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'record') 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); -- cgit v1.2.3