aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 378373fe791..c17a25cbd05 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -10074,6 +10074,10 @@ static XrmOptionDescRec emacs_options[] = {
10074 10074
10075static int x_initialized; 10075static int x_initialized;
10076 10076
10077#ifdef HAVE_X_SM
10078static int x_session_initialized;
10079#endif
10080
10077#ifdef MULTI_KBOARD 10081#ifdef MULTI_KBOARD
10078/* Test whether two display-name strings agree up to the dot that separates 10082/* Test whether two display-name strings agree up to the dot that separates
10079 the screen number from the server number. */ 10083 the screen number from the server number. */
@@ -10151,6 +10155,21 @@ get_bits_and_offset (mask, bits, offset)
10151 *bits = nr; 10155 *bits = nr;
10152} 10156}
10153 10157
10158int
10159x_display_ok (display)
10160 const char * display;
10161{
10162 int dpy_ok = 1;
10163 Display *dpy;
10164
10165 dpy = XOpenDisplay (display);
10166 if (dpy)
10167 XCloseDisplay (dpy);
10168 else
10169 dpy_ok = 0;
10170 return dpy_ok;
10171}
10172
10154struct x_display_info * 10173struct x_display_info *
10155x_term_init (display_name, xrm_option, resource_name) 10174x_term_init (display_name, xrm_option, resource_name)
10156 Lisp_Object display_name; 10175 Lisp_Object display_name;
@@ -10233,11 +10252,9 @@ x_term_init (display_name, xrm_option, resource_name)
10233 10252
10234 /* Load our own gtkrc if it exists. */ 10253 /* Load our own gtkrc if it exists. */
10235 { 10254 {
10236 struct gcpro gcpro1, gcpro2;
10237 char *file = "~/.emacs.d/gtkrc"; 10255 char *file = "~/.emacs.d/gtkrc";
10238 Lisp_Object s, abs_file; 10256 Lisp_Object s, abs_file;
10239 10257
10240 GCPRO2 (s, abs_file);
10241 s = make_string (file, strlen (file)); 10258 s = make_string (file, strlen (file));
10242 abs_file = Fexpand_file_name (s, Qnil); 10259 abs_file = Fexpand_file_name (s, Qnil);
10243 10260
@@ -10899,6 +10916,9 @@ x_initialize ()
10899 last_tool_bar_item = -1; 10916 last_tool_bar_item = -1;
10900 any_help_event_p = 0; 10917 any_help_event_p = 0;
10901 ignore_next_mouse_click_timeout = 0; 10918 ignore_next_mouse_click_timeout = 0;
10919#ifdef HAVE_X_SM
10920 x_session_initialized = 0;
10921#endif
10902 10922
10903#ifdef USE_GTK 10923#ifdef USE_GTK
10904 current_count = -1; 10924 current_count = -1;