diff options
Diffstat (limited to 'src/xterm.c')
| -rw-r--r-- | src/xterm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/xterm.c b/src/xterm.c index 21968b38e78..00c61c486ed 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -30382,7 +30382,7 @@ static bool x_timeout_atimer_activated_flag; | |||
| 30382 | 30382 | ||
| 30383 | #endif /* USE_X_TOOLKIT */ | 30383 | #endif /* USE_X_TOOLKIT */ |
| 30384 | 30384 | ||
| 30385 | static int x_initialized; | 30385 | static bool x_initialized; |
| 30386 | 30386 | ||
| 30387 | /* Test whether two display-name strings agree up to the dot that separates | 30387 | /* Test whether two display-name strings agree up to the dot that separates |
| 30388 | the screen number from the server number. */ | 30388 | the screen number from the server number. */ |
| @@ -30594,10 +30594,11 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) | |||
| 30594 | 30594 | ||
| 30595 | block_input (); | 30595 | block_input (); |
| 30596 | 30596 | ||
| 30597 | bool was_initialized = x_initialized; | ||
| 30597 | if (!x_initialized) | 30598 | if (!x_initialized) |
| 30598 | { | 30599 | { |
| 30599 | x_initialize (); | 30600 | x_initialize (); |
| 30600 | ++x_initialized; | 30601 | x_initialized = true; |
| 30601 | } | 30602 | } |
| 30602 | 30603 | ||
| 30603 | #if defined USE_X_TOOLKIT || defined USE_GTK | 30604 | #if defined USE_X_TOOLKIT || defined USE_GTK |
| @@ -30615,7 +30616,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) | |||
| 30615 | char **argv2 = argv; | 30616 | char **argv2 = argv; |
| 30616 | guint id; | 30617 | guint id; |
| 30617 | 30618 | ||
| 30618 | if (x_initialized++ > 1) | 30619 | if (was_initialized) |
| 30619 | { | 30620 | { |
| 30620 | xg_display_open (SSDATA (display_name), &dpy); | 30621 | xg_display_open (SSDATA (display_name), &dpy); |
| 30621 | } | 30622 | } |