dix: set the correct length in CreateClassesChangedEvent.

Fallout from aeff14d5f2. Yes, we don't malloc
anymore because we are inside a SIGIO and the memory is already there anyway.
But we still need to set the event length correctly, otherwise
mieqEnqueue/mieqProcessInputEvent don't know how much memory to copy.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2008-12-16 14:19:38 +10:00
parent 1001403301
commit 689be0cb4b

View File

@ -119,6 +119,7 @@ CreateClassesChangedEvent(EventList* event,
deviceClassesChangedEvent *dcce;
int len = sizeof(xEvent);
CARD32 ms = GetTimeInMillis();
int namelen = 0; /* dummy */
dcce = (deviceClassesChangedEvent*)event->event;
dcce->type = GenericEvent;
@ -126,6 +127,7 @@ CreateClassesChangedEvent(EventList* event,
dcce->evtype = XI_DeviceClassesChangedNotify;
dcce->time = ms;
dcce->new_slave = slave->id;
SizeDeviceInfo(slave, &namelen, &len);
dcce->length = (len - sizeof(xEvent))/4;
}