aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winkeybd.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-07-27 14:09:54 +0000
committermarha <marha@users.sourceforge.net>2009-07-27 14:09:54 +0000
commite3cca1a275a55fcc5e074a7cc7aaa5d0764b9659 (patch)
treeeec421a528cb2f0fdaff43d4cf82fc0af89c0392 /xorg-server/hw/xwin/winkeybd.c
parent2553bdd7c359cd87525d367761c86932cec5adff (diff)
downloadvcxsrv-e3cca1a275a55fcc5e074a7cc7aaa5d0764b9659.tar.gz
vcxsrv-e3cca1a275a55fcc5e074a7cc7aaa5d0764b9659.tar.bz2
vcxsrv-e3cca1a275a55fcc5e074a7cc7aaa5d0764b9659.zip
vcxsrv compiles now. Still run-time errors.
Diffstat (limited to 'xorg-server/hw/xwin/winkeybd.c')
-rw-r--r--xorg-server/hw/xwin/winkeybd.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/xorg-server/hw/xwin/winkeybd.c b/xorg-server/hw/xwin/winkeybd.c
index 1cd3e4cb3..5ac558d98 100644
--- a/xorg-server/hw/xwin/winkeybd.c
+++ b/xorg-server/hw/xwin/winkeybd.c
@@ -308,12 +308,24 @@ winKeybdProc (DeviceIntPtr pDeviceInt, int iState)
#endif
break;
- case DEVICE_ON:
+ case DEVICE_ON:
+ {
+ DeviceIntPtr master;
pDevice->on = TRUE;
// immediately copy the state of this keyboard device to the VCK
// (which otherwise happens lazily after the first keypress)
- SwitchCoreKeyboard(pDeviceInt);
+ master = (!pDeviceInt->isMaster && pDeviceInt->u.master) ? pDeviceInt->u.master : NULL;
+ if (master)
+ {
+ /* Force a copy of the key class into the VCK so that the layout
+ is transferred. */
+ if (!master->key)
+ master = GetPairedDevice(master);
+ CopyKeyClass(pDeviceInt, master);
+ }
+ }
+
break;
case DEVICE_CLOSE: