]> granicus.if.org Git - vim/commitdiff
patch 7.4.2193 v7.4.2193
authorBram Moolenaar <Bram@vim.org>
Wed, 10 Aug 2016 19:28:44 +0000 (21:28 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 10 Aug 2016 19:28:44 +0000 (21:28 +0200)
Problem:    With Gnome when the GUI can't start test_startup hangs.
Solution:   Call gui_mch_early_init_check(). (Hirohito Higashi)

src/gui.c
src/gui_gtk_x11.c
src/proto/gui_gtk_x11.pro
src/version.c

index 88b5d7bf9fc622fe667a1d841ea3b98bdfdbc0eb..0d858ec5b16886a2c957fc5cca427e70b738f494 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -447,7 +447,7 @@ gui_init_check(void)
      * See gui_do_fork().
      * Use a simpler check if the GUI window can probably be opened.
      */
-    result = gui.dofork ? gui_mch_early_init_check() : gui_mch_init_check();
+    result = gui.dofork ? gui_mch_early_init_check(TRUE) : gui_mch_init_check();
 # else
     result = gui_mch_init_check();
 # endif
index 939ecde7eefeba6b6fbbbebfeaf3a5c7707d3b17..7c63a49fc6026be70468ddb6e146524b250f65c0 100644 (file)
@@ -542,8 +542,10 @@ gui_mch_prepare(int *argc, char **argv)
        }
 
        /* These arguments make gnome_program_init() print a message and exit.
-        * Must start the GUI for this, otherwise ":gui" will exit later! */
-       if (option->flags & ARG_NEEDS_GUI)
+        * Must start the GUI for this, otherwise ":gui" will exit later!
+        * Only when the GUI can start. */
+       if ((option->flags & ARG_NEEDS_GUI)
+                                     && gui_mch_early_init_check(FALSE) == OK)
            gui.starting = TRUE;
 
        if (option->flags & ARG_KEEP)
@@ -1663,7 +1665,7 @@ selection_get_cb(GtkWidget            *widget UNUSED,
  * Return OK or FAIL.
  */
     int
-gui_mch_early_init_check(void)
+gui_mch_early_init_check(int give_message)
 {
     char_u *p;
 
@@ -1672,7 +1674,8 @@ gui_mch_early_init_check(void)
     if (p == NULL || *p == NUL)
     {
        gui.dying = TRUE;
-       EMSG(_((char *)e_opendisp));
+       if (give_message)
+           EMSG(_((char *)e_opendisp));
        return FAIL;
     }
     return OK;
index b79feb8e4ecc9af2e2488284efccb75afe756d28..f663dbaf10756037a939e273ffda46a21da08920 100644 (file)
@@ -6,7 +6,7 @@ int gui_mch_is_blink_off(void);
 void gui_mch_set_blinking(long waittime, long on, long off);
 void gui_mch_stop_blink(void);
 void gui_mch_start_blink(void);
-int gui_mch_early_init_check(void);
+int gui_mch_early_init_check(int give_message);
 int gui_mch_init_check(void);
 void gui_mch_show_tabline(int showit);
 int gui_mch_showing_tabline(void);
index c775c3736a8ada0180603300afb49fd556e089ce..3adadd48b3b44fef8083c323d0de1b711006b083 100644 (file)
@@ -763,6 +763,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2193,
 /**/
     2192,
 /**/