diff options
author | marha <marha@users.sourceforge.net> | 2009-09-24 10:49:08 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-09-24 10:49:08 +0000 |
commit | 67b353c9ce039b254ba2e92cd6f842c505a8bd21 (patch) | |
tree | edb5f3ff6a9564a50f3b701913ab2b3aafa80a95 /xorg-server/mi/mieq.c | |
parent | f3d88db0960f1c23e55f2529764b096ac92d78d9 (diff) | |
download | vcxsrv-67b353c9ce039b254ba2e92cd6f842c505a8bd21.tar.gz vcxsrv-67b353c9ce039b254ba2e92cd6f842c505a8bd21.tar.bz2 vcxsrv-67b353c9ce039b254ba2e92cd6f842c505a8bd21.zip |
Update following packages:
- xproto-7.0.16
- libXdmcp-1.0.3
- bdftopcf-1.0.2
- xorg-server-1.6.99.902
Diffstat (limited to 'xorg-server/mi/mieq.c')
-rw-r--r-- | xorg-server/mi/mieq.c | 33 |
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; |