mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-25 02:30:06 +01:00
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>
This commit is contained in:
parent
10c0287232
commit
82f42730fa
2 changed files with 11 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
11
mi/mieq.c
11
mi/mieq.c
|
|
@ -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. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue