| To: vim_dev@googlegroups.com |
| Subject: Patch 7.4.666 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.4.666 |
| Problem: There is a chance that Vim may lock up. |
| Solution: Handle timer events differently. (Aaron Burrow) |
| Files: src/os_unix.c |
| |
| |
| |
| |
| |
| *** 7096,7114 **** |
| { |
| XEvent event; |
| |
| ! while (XtAppPending(app_context) && !vim_is_input_buf_full()) |
| { |
| ! XtAppNextEvent(app_context, &event); |
| ! #ifdef FEAT_CLIENTSERVER |
| { |
| ! XPropertyEvent *e = (XPropertyEvent *)&event; |
| |
| ! if (e->type == PropertyNotify && e->window == commWindow |
| && e->atom == commProperty && e->state == PropertyNewValue) |
| ! serverEventProc(xterm_dpy, &event); |
| ! } |
| #endif |
| ! XtDispatchEvent(&event); |
| } |
| } |
| |
| --- 7096,7128 ---- |
| { |
| XEvent event; |
| |
| ! for (;;) |
| { |
| ! XtInputMask mask = XtAppPending(app_context); |
| ! |
| ! if (mask == 0 || vim_is_input_buf_full()) |
| ! break; |
| ! |
| ! if (mask & XtIMXEvent) |
| { |
| ! /* There is an event to process. */ |
| ! XtAppNextEvent(app_context, &event); |
| ! #ifdef FEAT_CLIENTSERVER |
| ! { |
| ! XPropertyEvent *e = (XPropertyEvent *)&event; |
| |
| ! if (e->type == PropertyNotify && e->window == commWindow |
| && e->atom == commProperty && e->state == PropertyNewValue) |
| ! serverEventProc(xterm_dpy, &event); |
| ! } |
| #endif |
| ! XtDispatchEvent(&event); |
| ! } |
| ! else |
| ! { |
| ! /* There is something else than an event to process. */ |
| ! XtAppProcessEvent(app_context, mask); |
| ! } |
| } |
| } |
| |
| |
| |
| |
| *** 743,744 **** |
| --- 743,746 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 666, |
| /**/ |
| |
| -- |
| Q: How many hardware engineers does it take to change a lightbulb? |
| A: None. We'll fix it in software. |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ an exciting new programming language -- http://www.Zimbu.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |