Commit b0b0efc9 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Keyboard.c: free remote keybord names once no longer needed

parent 13536693
...@@ -80,7 +80,8 @@ is" without express or implied warranty. ...@@ -80,7 +80,8 @@ is" without express or implied warranty.
#include <errno.h> #include <errno.h>
static void nxagentXkbGetNames(void); static void nxagentXkbGetRemoteNames(void);
static void nxagentXkbClearRemoteNames(void);
void nxagentKeycodeConversionSetup(void); void nxagentKeycodeConversionSetup(void);
...@@ -696,6 +697,9 @@ XkbError: ...@@ -696,6 +697,9 @@ XkbError:
} }
#endif #endif
/* we don't need the remote keyboard information anymore */
nxagentXkbClearRemoteNames();
xkb = XkbGetKeyboard(nxagentDisplay, XkbGBN_AllComponentsMask, XkbUseCoreKbd); xkb = XkbGetKeyboard(nxagentDisplay, XkbGBN_AllComponentsMask, XkbUseCoreKbd);
if (xkb && xkb->geom) if (xkb && xkb->geom)
...@@ -1341,7 +1345,7 @@ void nxagentTuneXkbWrapper(void) ...@@ -1341,7 +1345,7 @@ void nxagentTuneXkbWrapper(void)
} }
} }
void nxagentXkbClearNames(void) void nxagentXkbClearRemoteNames(void)
{ {
SAFE_free(nxagentRemoteRules); SAFE_free(nxagentRemoteRules);
SAFE_free(nxagentRemoteModel); SAFE_free(nxagentRemoteModel);
...@@ -1350,7 +1354,7 @@ void nxagentXkbClearNames(void) ...@@ -1350,7 +1354,7 @@ void nxagentXkbClearNames(void)
SAFE_free(nxagentRemoteOptions); SAFE_free(nxagentRemoteOptions);
} }
static void nxagentXkbGetNames(void) static void nxagentXkbGetRemoteNames(void)
{ {
if (nxagentRemoteRules) if (nxagentRemoteRules)
return; return;
...@@ -1554,7 +1558,7 @@ void nxagentKeycodeConversionSetup(void) ...@@ -1554,7 +1558,7 @@ void nxagentKeycodeConversionSetup(void)
Bool nxagentGetRemoteXkbExtension(void) Bool nxagentGetRemoteXkbExtension(void)
{ {
nxagentXkbInfo.Opcode = nxagentXkbInfo.EventBase = nxagentXkbInfo.ErrorBase = nxagentXkbInfo.MajorVersion = nxagentXkbInfo.MinorVersion = -1; nxagentXkbInfo.Opcode = nxagentXkbInfo.EventBase = nxagentXkbInfo.ErrorBase = nxagentXkbInfo.MajorVersion = nxagentXkbInfo.MinorVersion = -1;
nxagentXkbClearNames(); nxagentXkbClearRemoteNames();
Bool result = XkbQueryExtension(nxagentDisplay, Bool result = XkbQueryExtension(nxagentDisplay,
&nxagentXkbInfo.Opcode, &nxagentXkbInfo.Opcode,
...@@ -1565,7 +1569,7 @@ Bool nxagentGetRemoteXkbExtension(void) ...@@ -1565,7 +1569,7 @@ Bool nxagentGetRemoteXkbExtension(void)
if (result) if (result)
{ {
nxagentXkbGetNames(); nxagentXkbGetRemoteNames();
} }
#ifdef WARNING #ifdef WARNING
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment