diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2020-12-31 01:10:33 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-01-15 16:38:11 +0100 |
commit | d2ba4ddb8693f997eab2812995ff7474d8dd999e (patch) | |
tree | 845bdfbf7a66eea339588efcbab50471a19ab3bf /nx-X11 | |
parent | f10e9d9ac1e689222c03ce823fdce99d78ae6b3e (diff) | |
download | nx-libs-d2ba4ddb8693f997eab2812995ff7474d8dd999e.tar.gz nx-libs-d2ba4ddb8693f997eab2812995ff7474d8dd999e.tar.bz2 nx-libs-d2ba4ddb8693f997eab2812995ff7474d8dd999e.zip |
nxagent: make nxagentXkbState.Initialized a Boolean
Diffstat (limited to 'nx-X11')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Events.c | 6 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Keyboard.h | 3 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 2 |
4 files changed, 6 insertions, 7 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 1758f649c..a9a79cebd 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -1143,7 +1143,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already nxagentKeyDown = 0; } - if (nxagentXkbState.Initialized == 0) + if (!nxagentXkbState.Initialized) { if (X.xkey.keycode == nxagentCapsLockKeycode) { @@ -2263,7 +2263,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already int nxagentHandleKeyPress(XEvent *X, enum HandleEventResult *result) { - if (nxagentXkbState.Initialized == 0) + if (!nxagentXkbState.Initialized) { if (X -> xkey.keycode == nxagentCapsLockKeycode) { @@ -2741,7 +2741,7 @@ int nxagentHandleXkbKeyboardStateEvent(XEvent *X) nxagentXkbState.Locked); #endif - nxagentXkbState.Initialized = 1; + nxagentXkbState.Initialized = True; if (nxagentXkbState.Caps == 0 && (nxagentXkbState.Locked & CAPSFLAG_IN_EVENT)) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index c9c9bb33b..38955f669 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -161,7 +161,7 @@ XkbAgentInfoRec nxagentXkbInfo = { -1, -1, -1, -1, -1 }; * Keyboard status, updated through XKB events. */ -XkbAgentStateRec nxagentXkbState = { 0, 0, 0, 0, 0 }; +XkbAgentStateRec nxagentXkbState = { 0, 0, 0, 0, False }; /* * Info for disabling/enabling Xkb extension. diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.h b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.h index dbfb47733..504c99869 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.h @@ -68,8 +68,7 @@ typedef struct _XkbAgentState int Caps; int Num; int Focus; - int Initialized; - + Bool Initialized; } XkbAgentStateRec; extern XkbAgentStateRec nxagentXkbState; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c index 101796748..d0f83e7bd 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c @@ -616,7 +616,7 @@ Bool nxagentReconnectSession(void) } } - nxagentXkbState.Initialized = 0; + nxagentXkbState.Initialized = False; SAFE_free(nxagentOldKeyboard); |