diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2020-04-09 20:23:46 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-05-07 14:58:17 +0200 |
commit | b0b0efc98d6f720d7ea104d059e3f014bdd0f5a3 (patch) | |
tree | df11554e9208b9025b934415b25a2a1c01842ad7 /nx-X11 | |
parent | 13536693d89077daa3cde370bb43decbf24ec212 (diff) | |
download | nx-libs-b0b0efc98d6f720d7ea104d059e3f014bdd0f5a3.tar.gz nx-libs-b0b0efc98d6f720d7ea104d059e3f014bdd0f5a3.tar.bz2 nx-libs-b0b0efc98d6f720d7ea104d059e3f014bdd0f5a3.zip |
Keyboard.c: free remote keybord names once no longer needed
Diffstat (limited to 'nx-X11')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 950aec839..233b6df74 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -80,7 +80,8 @@ is" without express or implied warranty. #include <errno.h> -static void nxagentXkbGetNames(void); +static void nxagentXkbGetRemoteNames(void); +static void nxagentXkbClearRemoteNames(void); void nxagentKeycodeConversionSetup(void); @@ -696,6 +697,9 @@ XkbError: } #endif + /* we don't need the remote keyboard information anymore */ + nxagentXkbClearRemoteNames(); + xkb = XkbGetKeyboard(nxagentDisplay, XkbGBN_AllComponentsMask, XkbUseCoreKbd); if (xkb && xkb->geom) @@ -1341,7 +1345,7 @@ void nxagentTuneXkbWrapper(void) } } -void nxagentXkbClearNames(void) +void nxagentXkbClearRemoteNames(void) { SAFE_free(nxagentRemoteRules); SAFE_free(nxagentRemoteModel); @@ -1350,7 +1354,7 @@ void nxagentXkbClearNames(void) SAFE_free(nxagentRemoteOptions); } -static void nxagentXkbGetNames(void) +static void nxagentXkbGetRemoteNames(void) { if (nxagentRemoteRules) return; @@ -1554,7 +1558,7 @@ void nxagentKeycodeConversionSetup(void) Bool nxagentGetRemoteXkbExtension(void) { nxagentXkbInfo.Opcode = nxagentXkbInfo.EventBase = nxagentXkbInfo.ErrorBase = nxagentXkbInfo.MajorVersion = nxagentXkbInfo.MinorVersion = -1; - nxagentXkbClearNames(); + nxagentXkbClearRemoteNames(); Bool result = XkbQueryExtension(nxagentDisplay, &nxagentXkbInfo.Opcode, @@ -1565,7 +1569,7 @@ Bool nxagentGetRemoteXkbExtension(void) if (result) { - nxagentXkbGetNames(); + nxagentXkbGetRemoteNames(); } #ifdef WARNING else |