summaryrefslogtreecommitdiff
path: root/hw/xwin/winkeybd.c
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2008-11-02 18:27:12 +0000
committerJon TURNEY <jon.turney@dronecode.org.uk>2008-12-17 13:37:37 +0000
commit816e0d243df068bc06d328874b5655d4530fe16a (patch)
treef58b8b29bd739fe5c28aafd99b165fe4e21ccaba /hw/xwin/winkeybd.c
parentbca7483c4e95ad450fb09048a3b85bb3056a0518 (diff)
Cygwin/X: update for changes in mieq API
Bring Cygwin/X up to date with mieq event API changes Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Diffstat (limited to 'hw/xwin/winkeybd.c')
-rw-r--r--hw/xwin/winkeybd.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/hw/xwin/winkeybd.c b/hw/xwin/winkeybd.c
index d574f2053..90cd5af4a 100644
--- a/hw/xwin/winkeybd.c
+++ b/hw/xwin/winkeybd.c
@@ -580,7 +580,8 @@ winKeybdReleaseKeys ()
void
winSendKeyEvent (DWORD dwKey, Bool fDown)
{
- xEvent xCurrentEvent;
+ EventListPtr events;
+ int i, nevents;
/*
* When alt-tabing between screens we can get phantom key up messages
@@ -590,14 +591,17 @@ winSendKeyEvent (DWORD dwKey, Bool fDown)
/* Update the keyState map */
g_winKeyState[dwKey] = fDown;
-
- ZeroMemory (&xCurrentEvent, sizeof (xCurrentEvent));
- xCurrentEvent.u.u.type = fDown ? KeyPress : KeyRelease;
- xCurrentEvent.u.keyButtonPointer.time =
- g_c32LastInputEventTime = GetTickCount ();
- xCurrentEvent.u.u.detail = dwKey + MIN_KEYCODE;
- mieqEnqueue (&xCurrentEvent);
+ GetEventList(&events);
+ nevents = GetKeyboardEvents(events, g_pwinKeyboard, fDown ? KeyPress : KeyRelease, dwKey + MIN_KEYCODE);
+
+ for (i = 0; i < nevents; i++)
+ mieqEnqueue(g_pwinKeyboard, events[i].event);
+
+#if CYGDEBUG
+ ErrorF("winSendKeyEvent: dwKey: %d, fDown: %d, nEvents %d\n",
+ dwKey, fDown, nevents);
+#endif
}
BOOL winCheckKeyPressed(WPARAM wParam, LPARAM lParam)