summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2009-06-19 21:14:47 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2010-02-05 19:15:05 +0000
commit2f2f3da080629d410dd99e281c382b54f0dbbf5d (patch)
treeb91df7a587b85fcb7feb649d87b631bc6f3c60a2 /hw
parent7a440e5b7a416e582b6c3cc4c33822854ce73aed (diff)
Cygwin/X: Copy the state of the Windows keyboard device to the Virtual Core Keyboard at startup.
Otherwise, this happens lazily after the first keypress, which can lead to applications which are started from a shell window and inspect the keyboard state before a character is typed getting the wrong idea about the desired keymap (e.g. xemacs shows this behaviour) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Diffstat (limited to 'hw')
-rw-r--r--hw/xwin/winkeybd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/xwin/winkeybd.c b/hw/xwin/winkeybd.c
index 317f14dff..a423b499a 100644
--- a/hw/xwin/winkeybd.c
+++ b/hw/xwin/winkeybd.c
@@ -273,6 +273,10 @@ winKeybdProc (DeviceIntPtr pDeviceInt, int iState)
case DEVICE_ON:
pDevice->on = TRUE;
+
+ // immediately copy the state of this keyboard device to the VCK
+ // (which otherwise happens lazily after the first keypress)
+ CopyKeyClass(pDeviceInt, inputInfo.keyboard);
break;
case DEVICE_CLOSE: