summaryrefslogtreecommitdiff
path: root/xkb/xkbInit.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-04-14 16:57:29 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-04-17 10:03:40 +1000
commitb406886bbffadaa52864a99f2a0520999eadc15d (patch)
tree815537f8c64b5de361d9232b537f9e62c2f4b865 /xkb/xkbInit.c
parent4e4e263bc073bf452f19c932b937c4881ae71f64 (diff)
input: allow NULL as XkbRMVLOSet in InitKeyboardDeviceStruct.
Virtually all callers use XkbGetRulesDefault(&rmlvo); InitKeyboardDeviceStruct(..., rmlvo); Let's save them the trouble and accept NULL as a hint to take the default RMLVO. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Close <Benjamin.Close@clearchain.com> Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'xkb/xkbInit.c')
-rw-r--r--xkb/xkbInit.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index 1f5f8dc49..2e7561294 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -474,10 +474,18 @@ InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet *rmlvo,
XkbSrvLedInfoPtr sli;
XkbChangesRec changes;
XkbEventCauseRec cause;
+ XkbRMLVOSet rmlvo_dflts = { NULL };
- if (dev->key || dev->kbdfeed || !rmlvo)
+ if (dev->key || dev->kbdfeed)
return False;
+ if (!rmlvo)
+ {
+ rmlvo = &rmlvo_dflts;
+ XkbGetRulesDflts(rmlvo);
+ }
+
+
memset(&changes, 0, sizeof(changes));
XkbSetCauseUnknown(&cause);