diff options
Diffstat (limited to 'xorg-server/hw/xwin')
-rw-r--r-- | xorg-server/hw/xwin/winkeybd.c | 13 | ||||
-rw-r--r-- | xorg-server/hw/xwin/winmouse.c | 23 |
2 files changed, 10 insertions, 26 deletions
diff --git a/xorg-server/hw/xwin/winkeybd.c b/xorg-server/hw/xwin/winkeybd.c index dd854820f..255015a24 100644 --- a/xorg-server/hw/xwin/winkeybd.c +++ b/xorg-server/hw/xwin/winkeybd.c @@ -487,8 +487,7 @@ winKeybdReleaseKeys (void) void
winSendKeyEvent (DWORD dwKey, Bool fDown)
{
- EventListPtr events;
- int i, nevents;
+ InternalEvent* events;
/*
* When alt-tabing between screens we can get phantom key up messages
@@ -499,14 +498,10 @@ winSendKeyEvent (DWORD dwKey, Bool fDown) /* Update the keyState map */
g_winKeyState[dwKey] = fDown;
- GetEventList(&events);
- nevents = GetKeyboardEvents(events, g_pwinKeyboard, fDown ? KeyPress : KeyRelease, dwKey + MIN_KEYCODE, NULL);
+ QueueKeyboardEvents(g_pwinKeyboard, fDown ? KeyPress : KeyRelease, dwKey + MIN_KEYCODE, NULL);
- for (i = 0; i < nevents; i++)
- mieqEnqueue(g_pwinKeyboard, (InternalEvent*)events[i].event);
-
- winDebug("winSendKeyEvent: dwKey: %d, fDown: %d, nEvents %d\n",
- dwKey, fDown, nevents);
+ winDebug("winSendKeyEvent: dwKey: %d, fDown: %d\n",
+ dwKey, fDown);
}
BOOL winCheckKeyPressed(WPARAM wParam, LPARAM lParam)
diff --git a/xorg-server/hw/xwin/winmouse.c b/xorg-server/hw/xwin/winmouse.c index 62e3f79b4..efe71103c 100644 --- a/xorg-server/hw/xwin/winmouse.c +++ b/xorg-server/hw/xwin/winmouse.c @@ -241,23 +241,17 @@ winMouseWheel (ScreenPtr pScreen, int iDeltaZ) void
winMouseButtonsSendEvent (int iEventType, int iButton)
{
- EventListPtr events;
- int i, nevents;
ValuatorMask mask;
if (g_winMouseButtonMap)
iButton = g_winMouseButtonMap[iButton];
valuator_mask_zero(&mask);
- GetEventList(&events);
- nevents = GetPointerEvents(events, g_pwinPointer, iEventType, iButton,
- POINTER_RELATIVE, &mask);
+ QueuePointerEvents(g_pwinPointer, iEventType, iButton,
+ POINTER_RELATIVE, &mask);
- for (i = 0; i < nevents; i++)
- mieqEnqueue(g_pwinPointer, (InternalEvent*)events[i].event);
-
- winDebug("winMouseButtonsSendEvent: iEventType: %d, iButton: %d, nEvents %d\n",
- iEventType, iButton, nevents);
+ winDebug("winMouseButtonsSendEvent: iEventType: %d, iButton: %d\n",
+ iEventType, iButton);
}
@@ -372,20 +366,15 @@ winMouseButtonsHandle (ScreenPtr pScreen, */
void winEnqueueMotion(int x, int y)
{
- int i, nevents;
int valuators[2];
ValuatorMask mask;
- EventListPtr events;
miPointerSetPosition(g_pwinPointer, POINTER_RELATIVE, &x, &y);
valuators[0] = x;
valuators[1] = y;
valuator_mask_set_range(&mask, 0, 2, valuators);
- GetEventList(&events);
- nevents = GetPointerEvents(events, g_pwinPointer, MotionNotify, 0,
- POINTER_ABSOLUTE | POINTER_SCREEN, &mask);
+ QueuePointerEvents(g_pwinPointer, MotionNotify, 0,
+ POINTER_ABSOLUTE | POINTER_SCREEN, &mask);
- for (i = 0; i < nevents; i++)
- mieqEnqueue(g_pwinPointer, (InternalEvent*)events[i].event);
}
|