summaryrefslogtreecommitdiff
path: root/hw/xnest/Events.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-04-15 10:07:10 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-05-11 14:27:36 +1000
commit20fb07f436f7d4a0f330b2067a93a5a4829fccf5 (patch)
treebd792a68e16770fd02208b9d334bbfeea24be330 /hw/xnest/Events.c
parent8670c46bdfdade64e63119d2ebbd5ef63b6fa2c3 (diff)
downloadxserver-20fb07f436f7d4a0f330b2067a93a5a4829fccf5.tar.gz
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/Events.c')
-rw-r--r--hw/xnest/Events.c14
1 files changed, 5 insertions, 9 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);
}