aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2017-03-10 23:30:02 +0100
committerUlrich Sibiller <uli42@gmx.de>2017-03-13 21:24:52 +0100
commit13a7c4a7335a6695ede3f2f3a58a06479ea9a6a2 (patch)
tree7a9ebe4838168c51fcf71b7eb1c81d0cbd5d7e9d /nx-X11/programs
parentf78e673fb0285b4adb89d3afa9a73576a5387266 (diff)
downloadnx-libs-13a7c4a7335a6695ede3f2f3a58a06479ea9a6a2.tar.gz
nx-libs-13a7c4a7335a6695ede3f2f3a58a06479ea9a6a2.tar.bz2
nx-libs-13a7c4a7335a6695ede3f2f3a58a06479ea9a6a2.zip
Keystroke.c: use symbols instead of integers
We have defined them, so use them!
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keystroke.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
index e61ecd2a5..281fec243 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
@@ -168,7 +168,7 @@ static Bool modifier_matches(unsigned int mask, int compare_alt_meta, unsigned i
static Bool read_binding_from_xmlnode(xmlNode *node, struct nxagentSpecialKeystrokeMap *ret)
{
struct nxagentSpecialKeystrokeMap newkm = {
- .stroke = 0,
+ .stroke = KEYSTROKE_END_MARKER,
.modifierMask = 0,
.modifierAltMeta = False,
.keysym = NoSymbol
@@ -186,8 +186,10 @@ static Bool read_binding_from_xmlnode(xmlNode *node, struct nxagentSpecialKeystr
#endif
continue;
}
+
if (strcmp((char *)attr->name, "action") == 0)
{
+ newkm.stroke = KEYSTROKE_END_MARKER;
for (int i = 0; nxagentSpecialKeystrokeNames[i] != NULL; i++)
{
if (strcmp(nxagentSpecialKeystrokeNames[i],(char *)attr->children->content) == 0)
@@ -222,7 +224,7 @@ static Bool read_binding_from_xmlnode(xmlNode *node, struct nxagentSpecialKeystr
else if (strcmp((char *)attr->name, "AltMeta") == 0) { newkm.modifierAltMeta = True; }
}
- if (newkm.stroke != 0 && newkm.keysym != NoSymbol)
+ if (newkm.stroke != KEYSTROKE_END_MARKER && newkm.keysym != NoSymbol)
{
/* keysym and stroke are required, everything else is optional */
memcpy(ret, &newkm, sizeof(struct nxagentSpecialKeystrokeMap));