changeset 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 7672ac27989e
children efd1add5bedf
files src/ChangeLog src/xterm.c
diffstat 2 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Mar 21 14:27:05 2006 +0000
+++ b/src/ChangeLog	Tue Mar 21 14:39:41 2006 +0000
@@ -1,3 +1,10 @@
+2006-03-21  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
+
+	* 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.
+
 2006-03-21  Kim F. Storm  <storm@cua.dk>
 
 	* fringe.c (draw_fringe_bitmap): Don't calculate default overlay arrow
--- 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;