aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/mi/mieq.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-24 16:26:20 +0000
committermarha <marha@users.sourceforge.net>2009-09-24 16:26:20 +0000
commit82967ab5e087a2fdfcb984f990ba117da68a5b60 (patch)
tree52ca72e09a0d1d0ecacfb51a8b0b5d1c8193449c /xorg-server/mi/mieq.c
parentf02db4f3b9d748e1fd06e3ae2985b9cf1547cc7e (diff)
parent67b353c9ce039b254ba2e92cd6f842c505a8bd21 (diff)
downloadvcxsrv-82967ab5e087a2fdfcb984f990ba117da68a5b60.tar.gz
vcxsrv-82967ab5e087a2fdfcb984f990ba117da68a5b60.tar.bz2
vcxsrv-82967ab5e087a2fdfcb984f990ba117da68a5b60.zip
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released
Diffstat (limited to 'xorg-server/mi/mieq.c')
-rw-r--r--xorg-server/mi/mieq.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/xorg-server/mi/mieq.c b/xorg-server/mi/mieq.c
index 1b81e4d99..4c6c3bdc6 100644
--- a/xorg-server/mi/mieq.c
+++ b/xorg-server/mi/mieq.c
@@ -110,24 +110,29 @@ mieqInit(void)
miEventQueue.handlers[i] = NULL;
for (i = 0; i < QUEUE_SIZE; i++)
{
- EventListPtr evlist = InitEventList(1);
- if (!evlist)
- FatalError("Could not allocate event queue.\n");
- miEventQueue.events[i].events = evlist;
+ if (miEventQueue.events[i].events == NULL) {
+ EventListPtr evlist = InitEventList(1);
+ if (!evlist)
+ FatalError("Could not allocate event queue.\n");
+ miEventQueue.events[i].events = evlist;
+ }
}
SetInputCheck(&miEventQueue.head, &miEventQueue.tail);
return TRUE;
}
-/* Ensure all events in the EQ are at least size bytes. */
void
-mieqResizeEvents(int min_size)
+mieqFini(void)
{
int i;
-
for (i = 0; i < QUEUE_SIZE; i++)
- SetMinimumEventSize(miEventQueue.events[i].events, 1, min_size);
+ {
+ if (miEventQueue.events[i].events != NULL) {
+ FreeEventList(miEventQueue.events[i].events, 1);
+ miEventQueue.events[i].events = NULL;
+ }
+ }
}
/*
@@ -264,7 +269,7 @@ ChangeDeviceID(DeviceIntPtr dev, InternalEvent* event)
case ET_ProximityOut:
case ET_Hierarchy:
case ET_DeviceChanged:
- event->device.deviceid = dev->id;
+ event->device_event.deviceid = dev->id;
break;
#if XFreeXDGA
case ET_DGAEvent:
@@ -275,7 +280,7 @@ ChangeDeviceID(DeviceIntPtr dev, InternalEvent* event)
case ET_RawButtonPress:
case ET_RawButtonRelease:
case ET_RawMotion:
- event->raw.deviceid = dev->id;
+ event->raw_event.deviceid = dev->id;
break;
default:
ErrorF("[mi] Unknown event type (%d), cannot change id.\n",
@@ -294,11 +299,11 @@ FixUpEventForMaster(DeviceIntPtr mdev, DeviceIntPtr sdev,
if (original->any.type == ET_ButtonPress ||
original->any.type == ET_ButtonRelease)
{
- int btn = original->device.detail.button;
+ int btn = original->device_event.detail.button;
if (!sdev->button)
return; /* Should never happen */
- master->device.detail.button = sdev->button->map[btn];
+ master->device_event.detail.button = sdev->button->map[btn];
}
}
@@ -377,8 +382,8 @@ mieqProcessDeviceEvent(DeviceIntPtr dev,
case ET_ButtonRelease:
if (dev && screen && screen != DequeueScreen(dev) && !handler) {
DequeueScreen(dev) = screen;
- x = event->device.root_x;
- y = event->device.root_y;
+ x = event->device_event.root_x;
+ y = event->device_event.root_y;
NewCurrentScreen (dev, DequeueScreen(dev), x, y);
}
break;