diff options
Diffstat (limited to 'hw/xwin')
-rw-r--r-- | hw/xwin/winkeybd.c | 6 | ||||
-rw-r--r-- | hw/xwin/winmouse.c | 15 |
2 files changed, 5 insertions, 16 deletions
diff --git a/hw/xwin/winkeybd.c b/hw/xwin/winkeybd.c index 912e2de1c..cf0dea22e 100644 --- a/hw/xwin/winkeybd.c +++ b/hw/xwin/winkeybd.c @@ -473,7 +473,6 @@ void winSendKeyEvent (DWORD dwKey, Bool fDown) { EventListPtr events; - int i, nevents; /* * When alt-tabing between screens we can get phantom key up messages @@ -485,10 +484,7 @@ winSendKeyEvent (DWORD dwKey, Bool fDown) g_winKeyState[dwKey] = fDown; GetEventList(&events); - nevents = GetKeyboardEvents(events, g_pwinKeyboard, fDown ? KeyPress : KeyRelease, dwKey + MIN_KEYCODE, NULL); - - for (i = 0; i < nevents; i++) - mieqEnqueue(g_pwinKeyboard, (InternalEvent*)events[i].event); + QueueKeyboardEvents(events, g_pwinKeyboard, fDown ? KeyPress : KeyRelease, dwKey + MIN_KEYCODE, NULL); winDebug("winSendKeyEvent: dwKey: %d, fDown: %d, nEvents %d\n", dwKey, fDown, nevents); diff --git a/hw/xwin/winmouse.c b/hw/xwin/winmouse.c index 080e09626..0e36687cf 100644 --- a/hw/xwin/winmouse.c +++ b/hw/xwin/winmouse.c @@ -235,7 +235,6 @@ void winMouseButtonsSendEvent (int iEventType, int iButton) { EventListPtr events; - int i, nevents; ValuatorMask mask; if (g_winMouseButtonMap) @@ -243,11 +242,8 @@ winMouseButtonsSendEvent (int iEventType, int iButton) valuator_mask_zero(&mask); GetEventList(&events); - nevents = GetPointerEvents(events, g_pwinPointer, iEventType, iButton, - POINTER_RELATIVE, &mask); - - for (i = 0; i < nevents; i++) - mieqEnqueue(g_pwinPointer, (InternalEvent*)events[i].event); + QueuePointerEvents(events, g_pwinPointer, iEventType, iButton, + POINTER_RELATIVE, &mask); #if CYGDEBUG ErrorF("winMouseButtonsSendEvent: iEventType: %d, iButton: %d, nEvents %d\n", @@ -367,7 +363,6 @@ winMouseButtonsHandle (ScreenPtr pScreen, */ void winEnqueueMotion(int x, int y) { - int i, nevents; int valuators[2]; ValuatorMask mask; EventListPtr events; @@ -378,9 +373,7 @@ void winEnqueueMotion(int x, int y) valuator_mask_set_range(&mask, 0, 2, valuators); GetEventList(&events); - nevents = GetPointerEvents(events, g_pwinPointer, MotionNotify, 0, - POINTER_ABSOLUTE | POINTER_SCREEN, &mask); + QueuePointerEvents(events, g_pwinPointer, MotionNotify, 0, + POINTER_ABSOLUTE | POINTER_SCREEN, &mask); - for (i = 0; i < nevents; i++) - mieqEnqueue(g_pwinPointer, (InternalEvent*)events[i].event); } |