Merge commit 'whot/server-1.6-branch' into server-1.6-branch

This commit is contained in:
Keith Packard 2009-01-12 10:40:04 -08:00
commit fdfc70ea0a
2 changed files with 11 additions and 2 deletions

View file

@ -186,7 +186,7 @@ XIGetDevice(xEvent* xE)
* This code is basically the old SwitchCoreKeyboard.
*/
static void
void
CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master)
{
static DeviceIntPtr lastMapNotifyDevice = NULL;

View file

@ -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. */