diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2024-05-21 22:32:05 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2024-05-21 22:32:05 +0200 |
commit | abc8f389feefea10ceb2d4a4c3b4e69d05dc5227 (patch) | |
tree | ccede72c0affca4510ea291d558b6231d6a7626d /nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | |
parent | f94f6b9f0ca45f244daf1fd731bfc15dbccfbabc (diff) | |
download | nx-libs-abc8f389feefea10ceb2d4a4c3b4e69d05dc5227.tar.gz nx-libs-abc8f389feefea10ceb2d4a4c3b4e69d05dc5227.tar.bz2 nx-libs-abc8f389feefea10ceb2d4a4c3b4e69d05dc5227.zip |
Keyboard.c: fix handling of keyboard=model/layout
Did simply not work without passing the default strings.
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Keyboard.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 0d6dfb416..1465dd19b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -763,14 +763,29 @@ XkbError: } } + /* FIXME: we should use the defaults here for any string that's empty. Unfortunately they are only set + in the Makefile in xkb directory, so we cannot simply refer to them here. Let's hardcode them for now. */ + #define XKB_DFLT_RULES_FILE "base" + #define XKB_DFLT_MODEL "pc102" + #define XKB_DFLT_LAYOUT "us" + #define XKB_DFLT_VARIANT "" + #define XKB_DFLT_OPTIONS "" + #ifdef DEBUG fprintf(stderr, "%s: Going to set rules and init device: " - "[rules='%s',model='%s',layout='%s',variant='%s',options='%s'].\n", __func__, - rules?rules:"(default)", model?model:"(default)", layout?layout:"(default)", - variant?variant:"(default)", options?options:"(default)"); + "[rules='%s', model='%s', layout='%s', variant='%s', options='%s'].\n", __func__, + rules ? rules : "<"XKB_DFLT_RULES_FILE ">", + model ? model : "<"XKB_DFLT_MODEL ">", + layout ? layout : "<"XKB_DFLT_LAYOUT ">", + variant ? variant : "<"XKB_DFLT_VARIANT ">", + options ? options : "<"XKB_DFLT_OPTIONS ">"); #endif - XkbSetRulesDflts(rules, model, layout, variant, options); + XkbSetRulesDflts(rules ? rules : XKB_DFLT_RULES_FILE, + model ? model : XKB_DFLT_MODEL, + layout ? layout : XKB_DFLT_LAYOUT, + variant ? variant : XKB_DFLT_VARIANT, + options ? options : XKB_DFLT_OPTIONS); XkbInitKeyboardDeviceStruct((void *)pDev, &names, &keySyms, modmap, nxagentBell, nxagentChangeKeyboardControl); |