To: vim_dev@googlegroups.com Subject: Patch 7.3.059 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.059 Problem: Netbeans: Problem with recursively handling messages for Athena and Motif. Solution: Call netbeans_parse_messages() in the main loop, like it's done for GTK. (Xavier de Gaye) Files: src/gui_x11.c, src/netbeans.c *** ../vim-7.3.058/src/gui_x11.c 2010-08-15 21:57:25.000000000 +0200 --- src/gui_x11.c 2010-11-16 14:53:18.000000000 +0100 *************** *** 2895,2900 **** --- 2895,2905 ---- focus = gui.in_focus; } + #if defined(FEAT_NETBEANS_INTG) + /* Process any queued netbeans messages. */ + netbeans_parse_messages(); + #endif + /* * Don't use gui_mch_update() because then we will spin-lock until a * char arrives, instead we use XtAppProcessEvent() to hang until an *** ../vim-7.3.058/src/netbeans.c 2010-09-30 21:03:13.000000000 +0200 --- src/netbeans.c 2010-11-16 14:52:55.000000000 +0100 *************** *** 726,734 **** static char_u *buf = NULL; int len = 0; int readlen = 0; - #if defined(NB_HAS_GUI) && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32) - static int level = 0; - #endif #ifdef HAVE_SELECT struct timeval tval; fd_set rfds; --- 726,731 ---- *************** *** 744,756 **** return; } - #if defined(NB_HAS_GUI) && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32) - /* recursion guard; this will be called from the X event loop at unknown - * moments */ - if (NB_HAS_GUI) - ++level; - #endif - /* Allocate a buffer to read into. */ if (buf == NULL) { --- 741,746 ---- *************** *** 803,823 **** return; /* don't try to parse it */ } ! #if defined(NB_HAS_GUI) && !defined(FEAT_GUI_W32) ! /* Let the main loop handle messages. */ ! if (NB_HAS_GUI) ! { ! # ifdef FEAT_GUI_GTK ! if (gtk_main_level() > 0) ! gtk_main_quit(); ! # else ! /* Parse the messages now, but avoid recursion. */ ! if (level == 1) ! netbeans_parse_messages(); ! ! --level; ! # endif ! } #endif } --- 793,801 ---- return; /* don't try to parse it */ } ! #if defined(NB_HAS_GUI) && defined(FEAT_GUI_GTK) ! if (NB_HAS_GUI && gtk_main_level() > 0) ! gtk_main_quit(); #endif } *** ../vim-7.3.058/src/version.c 2010-11-16 14:46:14.000000000 +0100 --- src/version.c 2010-11-16 14:50:57.000000000 +0100 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 59, /**/ -- ARTHUR: If you do not open these doors, we will take this castle by force ... [A bucket of slops land on ARTHUR. He tries to retain his dignity.] "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// 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 ///