Skip to content

Commit 717e196

Browse files
committed
patch 7.4.2193
Problem: With Gnome when the GUI can't start test_startup hangs. Solution: Call gui_mch_early_init_check(). (Hirohito Higashi)
1 parent a6b7a08 commit 717e196

4 files changed

Lines changed: 11 additions & 6 deletions

File tree

src/gui.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ gui_init_check(void)
447447
* See gui_do_fork().
448448
* Use a simpler check if the GUI window can probably be opened.
449449
*/
450-
result = gui.dofork ? gui_mch_early_init_check() : gui_mch_init_check();
450+
result = gui.dofork ? gui_mch_early_init_check(TRUE) : gui_mch_init_check();
451451
# else
452452
result = gui_mch_init_check();
453453
# endif

src/gui_gtk_x11.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,10 @@ gui_mch_prepare(int *argc, char **argv)
542542
}
543543

544544
/* These arguments make gnome_program_init() print a message and exit.
545-
* Must start the GUI for this, otherwise ":gui" will exit later! */
546-
if (option->flags & ARG_NEEDS_GUI)
545+
* Must start the GUI for this, otherwise ":gui" will exit later!
546+
* Only when the GUI can start. */
547+
if ((option->flags & ARG_NEEDS_GUI)
548+
&& gui_mch_early_init_check(FALSE) == OK)
547549
gui.starting = TRUE;
548550

549551
if (option->flags & ARG_KEEP)
@@ -1663,7 +1665,7 @@ selection_get_cb(GtkWidget *widget UNUSED,
16631665
* Return OK or FAIL.
16641666
*/
16651667
int
1666-
gui_mch_early_init_check(void)
1668+
gui_mch_early_init_check(int give_message)
16671669
{
16681670
char_u *p;
16691671

@@ -1672,7 +1674,8 @@ gui_mch_early_init_check(void)
16721674
if (p == NULL || *p == NUL)
16731675
{
16741676
gui.dying = TRUE;
1675-
EMSG(_((char *)e_opendisp));
1677+
if (give_message)
1678+
EMSG(_((char *)e_opendisp));
16761679
return FAIL;
16771680
}
16781681
return OK;

src/proto/gui_gtk_x11.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ int gui_mch_is_blink_off(void);
66
void gui_mch_set_blinking(long waittime, long on, long off);
77
void gui_mch_stop_blink(void);
88
void gui_mch_start_blink(void);
9-
int gui_mch_early_init_check(void);
9+
int gui_mch_early_init_check(int give_message);
1010
int gui_mch_init_check(void);
1111
void gui_mch_show_tabline(int showit);
1212
int gui_mch_showing_tabline(void);

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,8 @@ static char *(features[]) =
763763

764764
static int included_patches[] =
765765
{ /* Add new patch number below this line */
766+
/**/
767+
2193,
766768
/**/
767769
2192,
768770
/**/

0 commit comments

Comments
 (0)