Mercurial > vim
comparison src/os_unix.c @ 6683:781104cb0d06 v7.4.666
updated for version 7.4.666
Problem: There is a chance that Vim may lock up.
Solution: Handle timer events differently. (Aaron Burrow)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 20 Mar 2015 16:26:54 +0100 |
parents | 48111d5fd8a8 |
children | 6529590f6c43 |
comparison
equal
deleted
inserted
replaced
6682:28bb3ecefb52 | 6683:781104cb0d06 |
---|---|
7094 static void | 7094 static void |
7095 xterm_update() | 7095 xterm_update() |
7096 { | 7096 { |
7097 XEvent event; | 7097 XEvent event; |
7098 | 7098 |
7099 while (XtAppPending(app_context) && !vim_is_input_buf_full()) | 7099 for (;;) |
7100 { | 7100 { |
7101 XtAppNextEvent(app_context, &event); | 7101 XtInputMask mask = XtAppPending(app_context); |
7102 | |
7103 if (mask == 0 || vim_is_input_buf_full()) | |
7104 break; | |
7105 | |
7106 if (mask & XtIMXEvent) | |
7107 { | |
7108 /* There is an event to process. */ | |
7109 XtAppNextEvent(app_context, &event); | |
7102 #ifdef FEAT_CLIENTSERVER | 7110 #ifdef FEAT_CLIENTSERVER |
7103 { | 7111 { |
7104 XPropertyEvent *e = (XPropertyEvent *)&event; | 7112 XPropertyEvent *e = (XPropertyEvent *)&event; |
7105 | 7113 |
7106 if (e->type == PropertyNotify && e->window == commWindow | 7114 if (e->type == PropertyNotify && e->window == commWindow |
7107 && e->atom == commProperty && e->state == PropertyNewValue) | 7115 && e->atom == commProperty && e->state == PropertyNewValue) |
7108 serverEventProc(xterm_dpy, &event); | 7116 serverEventProc(xterm_dpy, &event); |
7109 } | 7117 } |
7110 #endif | 7118 #endif |
7111 XtDispatchEvent(&event); | 7119 XtDispatchEvent(&event); |
7120 } | |
7121 else | |
7122 { | |
7123 /* There is something else than an event to process. */ | |
7124 XtAppProcessEvent(app_context, mask); | |
7125 } | |
7112 } | 7126 } |
7113 } | 7127 } |
7114 | 7128 |
7115 int | 7129 int |
7116 clip_xterm_own_selection(cbd) | 7130 clip_xterm_own_selection(cbd) |