diff options
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Reconnect.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c index de5f78fad..ce3e6ee05 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c @@ -553,12 +553,6 @@ Bool nxagentReconnectSession(void) strcmp(nxagentKeyboard, nxagentOldKeyboard) != 0 || strcmp(nxagentKeyboard, "query") == 0) { - if (nxagentOldKeyboard != NULL) - { - xfree(nxagentOldKeyboard); - - nxagentOldKeyboard = NULL; - } if (nxagentResetKeyboard() == 0) { @@ -576,6 +570,15 @@ Bool nxagentReconnectSession(void) } } + nxagentXkbState.Initialized = 0; + + if (nxagentOldKeyboard != NULL) + { + xfree(nxagentOldKeyboard); + + nxagentOldKeyboard = NULL; + } + nxagentDeactivatePointerGrab(); nxagentWakeupByReconnect(); @@ -686,6 +689,13 @@ nxagentReconnectError: nxagentDisconnectDisplay(); } + if (nxagentOldKeyboard != NULL) + { + xfree(nxagentOldKeyboard); + + nxagentOldKeyboard = NULL; + } + return 0; } |