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/xnest | |
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/xnest')
-rw-r--r-- | hw/xnest/Events.c | 14 | ||||
-rw-r--r-- | hw/xnest/Init.c | 4 |
2 files changed, 5 insertions, 13 deletions
diff --git a/hw/xnest/Events.c b/hw/xnest/Events.c index bbd70bf03..619427ded 100644 --- a/hw/xnest/Events.c +++ b/hw/xnest/Events.c @@ -43,8 +43,6 @@ is" without express or implied warranty. CARD32 lastEventTime = 0; -extern InternalEvent *xnestEvents; - void ProcessInputEvents(void) { @@ -104,9 +102,8 @@ xnestCollectExposures(void) void xnestQueueKeyEvent(int type, unsigned int keycode) { - GetEventList(&xnestEvents); lastEventTime = GetTimeInMillis(); - QueueKeyboardEvents(xnestEvents, xnestKeyboardDevice, type, keycode, NULL); + QueueKeyboardEvents(xnestKeyboardDevice, type, keycode, NULL); } void @@ -116,7 +113,6 @@ xnestCollectEvents(void) int valuators[2]; ValuatorMask mask; ScreenPtr pScreen; - GetEventList(&xnestEvents); while (XCheckIfEvent(xnestDisplay, &X, xnestNotExposurePredicate, NULL)) { switch (X.type) { @@ -134,7 +130,7 @@ xnestCollectEvents(void) valuator_mask_set_range(&mask, 0, 0, NULL); xnestUpdateModifierState(X.xkey.state); lastEventTime = GetTimeInMillis(); - QueuePointerEvents(xnestEvents, xnestPointerDevice, ButtonPress, + QueuePointerEvents(xnestPointerDevice, ButtonPress, X.xbutton.button, POINTER_RELATIVE, &mask); break; @@ -142,7 +138,7 @@ xnestCollectEvents(void) valuator_mask_set_range(&mask, 0, 0, NULL); xnestUpdateModifierState(X.xkey.state); lastEventTime = GetTimeInMillis(); - QueuePointerEvents(xnestEvents, xnestPointerDevice, ButtonRelease, + QueuePointerEvents(xnestPointerDevice, ButtonRelease, X.xbutton.button, POINTER_RELATIVE, &mask); break; @@ -151,7 +147,7 @@ xnestCollectEvents(void) valuators[1] = X.xmotion.y; valuator_mask_set_range(&mask, 0, 2, valuators); lastEventTime = GetTimeInMillis(); - QueuePointerEvents(xnestEvents, xnestPointerDevice, MotionNotify, + QueuePointerEvents(xnestPointerDevice, MotionNotify, 0, POINTER_ABSOLUTE, &mask); break; @@ -183,7 +179,7 @@ xnestCollectEvents(void) valuators[1] = X.xcrossing.y; valuator_mask_set_range(&mask, 0, 2, valuators); lastEventTime = GetTimeInMillis(); - QueuePointerEvents(xnestEvents, xnestPointerDevice, MotionNotify, + QueuePointerEvents(xnestPointerDevice, MotionNotify, 0, POINTER_ABSOLUTE, &mask); xnestDirectInstallColormaps(pScreen); } diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c index f8637f2ab..ee74101d2 100644 --- a/hw/xnest/Init.c +++ b/hw/xnest/Init.c @@ -45,8 +45,6 @@ is" without express or implied warranty. Bool xnestDoFullGeneration = True; -InternalEvent *xnestEvents = NULL; - void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[]) { @@ -100,8 +98,6 @@ InitInput(int argc, char *argv[]) if (rc != Success) FatalError("Failed to init Xnest default devices.\n"); - GetEventList(&xnestEvents); - mieqInit(); AddEnabledDevice(XConnectionNumber(xnestDisplay)); |