From 40f03399c706bbf00f2055a10c4b1bb3b49063a8 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Tue, 21 Mar 2017 22:32:00 +0100 Subject: Keystroke.c: use KEYSTROKE_NOTHING instead of KEYSTROKE_END_MARKER. This is cleaner since KEYSTROKE_END_MARKER really marks the end of the list. --- nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c index 69b07dfe5..136f53542 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c @@ -171,7 +171,7 @@ static Bool read_binding_from_xmlnode(xmlNode *node, struct nxagentSpecialKeystr { /* init the struct to have proper values in case not all attributes are found */ struct nxagentSpecialKeystrokeMap newkm = { - .stroke = KEYSTROKE_END_MARKER, + .stroke = KEYSTROKE_NOTHING, .modifierMask = 0, .modifierAltMeta = False, .keysym = NoSymbol @@ -192,7 +192,7 @@ static Bool read_binding_from_xmlnode(xmlNode *node, struct nxagentSpecialKeystr if (strcmp((char *)attr->name, "action") == 0) { - newkm.stroke = KEYSTROKE_END_MARKER; + newkm.stroke = KEYSTROKE_NOTHING; for (int i = 0; nxagentSpecialKeystrokeNames[i] != NULL; i++) { if (strcmp(nxagentSpecialKeystrokeNames[i], (char *)attr->children->content) == 0) @@ -228,7 +228,7 @@ static Bool read_binding_from_xmlnode(xmlNode *node, struct nxagentSpecialKeystr } } - if (newkm.stroke != KEYSTROKE_END_MARKER && newkm.keysym != NoSymbol) + if (newkm.stroke != KEYSTROKE_NOTHING && newkm.keysym != NoSymbol) { /* keysym and stroke are required, everything else is optional */ memcpy(ret, &newkm, sizeof(struct nxagentSpecialKeystrokeMap)); -- cgit v1.2.3