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