diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-06-08 23:14:20 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-06-08 23:28:28 +0930 |
commit | c68ca0c7b2c72df0501d26bf7f640029ff2d9568 (patch) | |
tree | d8be735c3d2686b9f4fd212de3344d834051c73b /hw/xnest/Events.c | |
parent | 34429d16d319ef2709c22a5c22f45d0e82c78b20 (diff) |
xnest: switch to using EventList rather than xEvents.
Diffstat (limited to 'hw/xnest/Events.c')
-rw-r--r-- | hw/xnest/Events.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/hw/xnest/Events.c b/hw/xnest/Events.c index f7a551c17..355b46f98 100644 --- a/hw/xnest/Events.c +++ b/hw/xnest/Events.c @@ -43,7 +43,7 @@ is" without express or implied warranty. CARD32 lastEventTime = 0; -extern xEvent *xnestEvents; +extern EventList *xnestEvents; void ProcessInputEvents() @@ -106,10 +106,11 @@ xnestQueueKeyEvent(int type, unsigned int keycode) { int i, n; + GetEventList(&xnestEvents); lastEventTime = GetTimeInMillis(); n = GetKeyboardEvents(xnestEvents, xnestKeyboardDevice, type, keycode); for (i = 0; i < n; i++) - mieqEnqueue(xnestKeyboardDevice, xnestEvents + i); + mieqEnqueue(xnestKeyboardDevice, (xnestEvents + i)->event); } void @@ -119,6 +120,7 @@ xnestCollectEvents(void) xEvent x; int i, n, valuators[2]; ScreenPtr pScreen; + GetEventList(&xnestEvents); while (XCheckIfEvent(xnestDisplay, &X, xnestNotExposurePredicate, NULL)) { switch (X.type) { @@ -138,7 +140,7 @@ xnestCollectEvents(void) n = GetPointerEvents(xnestEvents, xnestPointerDevice, ButtonPress, X.xbutton.button, POINTER_RELATIVE, 0, 0, NULL); for (i = 0; i < n; i++) - mieqEnqueue(xnestPointerDevice, xnestEvents + i); + mieqEnqueue(xnestPointerDevice, (xnestEvents + i)->event); break; case ButtonRelease: @@ -147,7 +149,7 @@ xnestCollectEvents(void) n = GetPointerEvents(xnestEvents, xnestPointerDevice, ButtonRelease, X.xbutton.button, POINTER_RELATIVE, 0, 0, NULL); for (i = 0; i < n; i++) - mieqEnqueue(xnestPointerDevice, xnestEvents + i); + mieqEnqueue(xnestPointerDevice, (xnestEvents + i)->event); break; case MotionNotify: @@ -157,7 +159,7 @@ xnestCollectEvents(void) n = GetPointerEvents(xnestEvents, xnestPointerDevice, MotionNotify, 0, POINTER_ABSOLUTE, 0, 2, valuators); for (i = 0; i < n; i++) - mieqEnqueue(xnestPointerDevice, xnestEvents + i); + mieqEnqueue(xnestPointerDevice, (xnestEvents + i)->event); break; case FocusIn: @@ -190,7 +192,7 @@ xnestCollectEvents(void) n = GetPointerEvents(xnestEvents, xnestPointerDevice, MotionNotify, 0, POINTER_ABSOLUTE, 0, 2, valuators); for (i = 0; i < n; i++) - mieqEnqueue(xnestPointerDevice, xnestEvents + i); + mieqEnqueue(xnestPointerDevice, (xnestEvents + i)->event); xnestDirectInstallColormaps(pScreen); } } |