summaryrefslogtreecommitdiffstats
path: root/src/os_unix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-12-17 17:59:31 +0100
committerBram Moolenaar <Bram@vim.org>2014-12-17 17:59:31 +0100
commit527a6785c73306ff72d83cbc2d1ea14f37aca142 (patch)
tree0a2f556c54b7ef59e28a8a6f84deaa7d449a6cfc /src/os_unix.c
parent140e995ed530770408a49f69f61d68f95b07e327 (diff)
updated for version 7.4.558v7.4.558
Problem: When the X server restarts Vim may get stuck. Solution: Destroy the application context and create it again. (Issue 203)
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index ff8834527f..bcf11ddc76 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -1617,6 +1617,17 @@ may_restore_clipboard()
if (xterm_dpy_was_reset)
{
xterm_dpy_was_reset = FALSE;
+
+# ifndef LESSTIF_VERSION
+ /* This has been reported to avoid Vim getting stuck. */
+ if (app_context != (XtAppContext)NULL)
+ {
+ XtDestroyApplicationContext(app_context);
+ app_context = (XtAppContext)NULL;
+ x11_display = NULL; /* freed by XtDestroyApplicationContext() */
+ }
+# endif
+
setup_term_clip();
get_x11_title(FALSE);
}