xkb: better support of XkbDfltXIId
XKB.h specifies that XkbDfltXIId should be used where the client doesn't care about the device identifier. We take this to mean core devices, where practical.
This commit is contained in:
parent
4d8030076e
commit
a05044cfc1
|
@ -78,6 +78,8 @@ _XkbLookupKeyboard(int id,int *why_rtrn)
|
|||
{
|
||||
DeviceIntPtr dev = NULL;
|
||||
|
||||
if (id == XkbDfltXIId)
|
||||
id = XkbUseCoreKbd;
|
||||
if ((dev= _XkbLookupAnyDevice(id,why_rtrn))==NULL)
|
||||
return NULL;
|
||||
else if ((!dev->key)||(!dev->key->xkbInfo)) {
|
||||
|
@ -108,6 +110,8 @@ _XkbLookupLedDevice(int id,int *why_rtrn)
|
|||
{
|
||||
DeviceIntPtr dev = NULL;
|
||||
|
||||
if (id == XkbDfltXIId)
|
||||
id = XkbUseCorePtr;
|
||||
if ((dev= _XkbLookupAnyDevice(id,why_rtrn))==NULL)
|
||||
return NULL;
|
||||
else if ((!dev->kbdfeed)&&(!dev->leds)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user