mi: switch the EQ to contain InternalEvents only.

This gets rid of the nevents parameter, InternalEvents are always a single
item per event. Also remove the special DeviceValuator handling in both
enqueueing and dequeueing.

Custom callback handlers are now broken until fixed.

For bisectability, we copy the InternalEvent back into the XI required during
POE and friends. Consider this a temporary solution.

Note: Because of misc linker bonghits, Xvfb won't link in this revision.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2009-01-30 14:34:02 +10:00
commit 4026c63e4e
5 changed files with 85 additions and 146 deletions

View file

@ -334,28 +334,25 @@ GetXIType(InternalEvent *event)
* allocates during SIGIO and makes a number of assumptions about what's in
* events. Will be removed soon.
*/
static int
ConvertBackToXI(EventListPtr events, int num_events)
int
ConvertBackToXI(InternalEvent *event, xEvent *ev)
{
int count = GetMaximumEventsNum();
int num = (num_events == 2) ? 1 : 0;
int i;
int evlen, i;
EventListPtr tmp_list = InitEventList(count);
SetMinimumEventSize(tmp_list, count, 1000); /* just to be sure */
if (num_events == 2) /* DCCE Event? */
{
if (EventToXI(events->event, tmp_list, &count))
ErrorF("[dix] conversion to XI failed\n");
memcpy(events->event, tmp_list->event, events->evlen);
events++;
}
if (EventToXI(events->event, tmp_list, &count))
if (EventToXI(event, tmp_list, &count))
ErrorF("[dix] conversion to XI failed\n");
if (tmp_list->event->u.u.type == GenericEvent)
evlen = (GEV(tmp_list->event))->length * 4 + 32;
else
evlen = count * 32;
for (i = 0; i < count; i++)
memcpy((events + i)->event, (tmp_list + i)->event, events->evlen);
return (count + num);
memcpy(&ev[i], (tmp_list + i)->event, evlen);
return count;
}