diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-04-15 10:07:10 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-05-11 14:27:36 +1000 |
commit | 20fb07f436f7d4a0f330b2067a93a5a4829fccf5 (patch) | |
tree | bd792a68e16770fd02208b9d334bbfeea24be330 /hw/kdrive | |
parent | 8670c46bdfdade64e63119d2ebbd5ef63b6fa2c3 (diff) |
input: remove DDX event list handling
The current approach to event posting required the DDX to request the event
list (allocated by the DIX) and then pass that list into QueuePointerEvent
and friends.
Remove this step and use the DIX event list directly. This means that
QueuePointerEvent is not reentrant but it wasn't before anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'hw/kdrive')
-rw-r--r-- | hw/kdrive/src/kinput.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index 62e8f7866..cdf55d7f9 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -66,8 +66,6 @@ static struct KdConfigDevice *kdConfigPointers = NULL; static KdKeyboardDriver *kdKeyboardDrivers = NULL; static KdPointerDriver *kdPointerDrivers = NULL; -static InternalEvent* kdEvents = NULL; - static Bool kdInputEnabled; static Bool kdOffScreen; static unsigned long kdOffScreenTime; @@ -1803,8 +1801,7 @@ KdReleaseAllKeys (void) key++) { if (key_is_down(ki->dixdev, key, KEY_POSTED | KEY_PROCESSED)) { KdHandleKeyboardEvent(ki, KeyRelease, key); - GetEventList(&kdEvents); - QueueGetKeyboardEvents(kdEvents, ki->dixdev, KeyRelease, key, NULL); + QueueGetKeyboardEvents(ki->dixdev, KeyRelease, key, NULL); } } } @@ -1860,8 +1857,7 @@ KdEnqueueKeyboardEvent(KdKeyboardInfo *ki, else type = KeyPress; - GetEventList(&kdEvents); - QueueKeyboardEvents(kdEvents, ki->dixdev, type, key_code, NULL); + QueueKeyboardEvents(ki->dixdev, type, key_code, NULL); } else { ErrorF("driver %s wanted to post scancode %d outside of [%d, %d]!\n", @@ -1969,8 +1965,7 @@ _KdEnqueuePointerEvent (KdPointerInfo *pi, int type, int x, int y, int z, valuator_mask_set_range(&mask, 0, 3, valuators); - GetEventList(&kdEvents); - QueuePointerEvents(kdEvents, pi->dixdev, type, b, absrel, &mask); + QueuePointerEvents(pi->dixdev, type, b, absrel, &mask); } void |