diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2008-12-15 10:46:07 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-01-12 18:27:09 +1000 |
commit | 82f42730fa268e85dc95c43a6450c35f9e57acdf (patch) | |
tree | ab7bbf391358d027726207af469700108c8d5c81 /mi | |
parent | 10c0287232eab1b93d078774f52e65efa0c03607 (diff) |
mi: force CopyKeyClass for key events. (#19048)
While we don't want to copy all other device classes into the VCK, we need to
copy the key class to transfer the layout from the SDs into the VCK.
This resembles the functionality of SwitchCoreKeyboard in server 1.5.
Thanks to Colin Guthrie for providing the follow-up patch (#19222)
X.Org Bug 19048 <http://bugs.freedesktop.org/show_bug.cgi?id=19048>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'mi')
-rw-r--r-- | mi/mieq.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -298,6 +298,8 @@ CopyGetMasterEvent(DeviceIntPtr mdev, xEvent* original, while (count--) ChangeDeviceID(mdev, &master->event[count]); } +extern void +CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master); /* Call this from ProcessInputEvents(). */ void @@ -360,8 +362,15 @@ mieqProcessInputEvents(void) NewCurrentScreen (dev, DequeueScreen(dev), x, y); } else { - if (master) + if (master) { + /* Force a copy of the key class into the VCK so that the layout + is transferred. */ + if (event->u.u.type == DeviceKeyPress || + event->u.u.type == DeviceKeyRelease) + CopyKeyClass(dev, master); + CopyGetMasterEvent(master, event, masterEvents, nevents); + } /* If someone's registered a custom event handler, let them * steal it. */ |