From 20fb07f436f7d4a0f330b2067a93a5a4829fccf5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 15 Apr 2011 10:07:10 +1000 Subject: 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 Reviewed-by: Jeremy Huddleston --- hw/kdrive/src/kinput.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'hw/kdrive') 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 -- cgit v1.2.3