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>
This commit is contained in:
Peter Hutterer 2009-04-14 16:57:29 +10:00
commit b406886bbf
6 changed files with 16 additions and 28 deletions

View file

@ -121,7 +121,6 @@ xnestKeyboardProc(DeviceIntPtr pDev, int onoff)
int i;
XKeyboardState values;
XkbDescPtr xkb;
XkbRMLVOSet rmlvo;
int op, event, error, major, minor;
switch (onoff)
@ -165,13 +164,7 @@ xnestKeyboardProc(DeviceIntPtr pDev, int onoff)
}
XkbGetControls(xnestDisplay, XkbAllControlsMask, xkb);
rmlvo.rules = XKB_DFLT_RULES;
rmlvo.model = XKB_DFLT_MODEL;
rmlvo.layout = XKB_DFLT_LAYOUT;
rmlvo.variant = XKB_DFLT_VARIANT;
rmlvo.options = XKB_DFLT_OPTIONS;
InitKeyboardDeviceStruct(pDev, &rmlvo,
InitKeyboardDeviceStruct(pDev, NULL,
xnestBell, xnestChangeKeyboardControl);
XkbDDXChangeControls(pDev, xkb->ctrls, xkb->ctrls);
XkbFreeKeyboard(xkb, 0, False);