diff src/xterm.c @ 69623:a80a437040ab

* xterm.c: x_session_initialized new variable. (x_term_init): Use x_session_initialized to check if x_session_initialize should be called. (x_initialize): Initialize x_session_initialized.
author Jan Dj?rv <jan.h.d@swipnet.se>
date Tue, 21 Mar 2006 14:39:41 +0000
parents 761eaec1aae4
children 68644cbc6a00 b901f4f12f33
line wrap: on
line diff
--- a/src/xterm.c	Tue Mar 21 14:27:05 2006 +0000
+++ b/src/xterm.c	Tue Mar 21 14:39:41 2006 +0000
@@ -10039,6 +10039,10 @@
 
 static int x_initialized;
 
+#ifdef HAVE_X_SM
+static int x_session_initialized;
+#endif
+
 #ifdef MULTI_KBOARD
 /* Test whether two display-name strings agree up to the dot that separates
    the screen number from the server number.  */
@@ -10607,7 +10611,7 @@
 
 #ifdef HAVE_X_SM
   /* Only do this for the first display.  */
-  if (x_initialized == 1)
+  if (!x_session_initialized++)
     x_session_initialize (dpyinfo);
 #endif
 
@@ -10792,6 +10796,9 @@
   last_tool_bar_item = -1;
   any_help_event_p = 0;
   ignore_next_mouse_click_timeout = 0;
+#ifdef HAVE_X_SM
+  x_session_initialized = 0;
+#endif
 
 #ifdef USE_GTK
   current_count = -1;