mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
Input: Overhaul keyboard initialisation process
XkbInitKeyboardDeviceStruct is now the only valid keyboard initialisation: all the details are hidden behind here. This now makes it impossible to supply a core keymap at startup. If dev->key is valid, dev->key->xkbInfo->desc is also valid. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -191,7 +191,6 @@ CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master)
|
||||
{
|
||||
static DeviceIntPtr lastMapNotifyDevice = NULL;
|
||||
KeyClassPtr mk, dk; /* master, device */
|
||||
BOOL sendNotify = FALSE;
|
||||
int i;
|
||||
|
||||
if (device == master)
|
||||
@@ -240,14 +239,8 @@ CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master)
|
||||
for (i = 0; i < 8; i++)
|
||||
mk->modifierKeyCount[i] = dk->modifierKeyCount[i];
|
||||
|
||||
if (dk->xkbInfo && dk->xkbInfo->desc) {
|
||||
if (!mk->xkbInfo || !mk->xkbInfo->desc) {
|
||||
XkbInitDevice(master);
|
||||
XkbFinishDeviceInit(master);
|
||||
}
|
||||
if (!XkbCopyKeymap(dk->xkbInfo->desc, mk->xkbInfo->desc, True))
|
||||
FatalError("Couldn't pivot keymap from device to core!\n");
|
||||
}
|
||||
if (!XkbCopyKeymap(dk->xkbInfo->desc, mk->xkbInfo->desc, True))
|
||||
FatalError("Couldn't pivot keymap from device to core!\n");
|
||||
|
||||
if (lastMapNotifyDevice != master) {
|
||||
SendMappingNotify(master, MappingKeyboard,
|
||||
|
||||
Reference in New Issue
Block a user