summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-10-14 22:14:56 +0300
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-10-14 22:14:56 +0300
commita05044cfc14a8bc6cc31236dcecada60bec09924 (patch)
tree267a7c30540e8e47b889603a0f612536c79fed53 /xkb
parent4d8030076ed1a7680bdfcb7b89af1045bdc40304 (diff)
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.
Diffstat (limited to 'xkb')
-rw-r--r--xkb/xkbUtils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 9a3be31b3..c8044c726 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -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)) {