XEmacs 21.2.16 "Sumida".
[chise/xemacs-chise.git.1] / src / frame-x.c
index a5d62c6..2aa7d59 100644 (file)
@@ -328,7 +328,7 @@ x_wm_store_class_hints (Widget shell, char *frame_name)
   XSetClassHint (dpy, XtWindow (shell), &classhint);
 }
 
-#ifndef HAVE_SESSION
+#ifndef HAVE_WMCOMMAND
 static void
 x_wm_maybe_store_wm_command (struct frame *f)
 {
@@ -379,7 +379,7 @@ x_wm_maybe_move_wm_command (struct frame *f)
 
     }
 }
-#endif /* !HAVE_SESSION */
+#endif /* !HAVE_WMCOMMAND */
 
 static int
 x_frame_iconified_p (struct frame *f)
@@ -2059,9 +2059,9 @@ x_popup_frame (struct frame *f)
        /* tell the window manager about us. */
        x_wm_store_class_hints (shell_widget, XtName (frame_widget));
 
-#ifndef HAVE_SESSION
+#ifndef HAVE_WMCOMMAND
        x_wm_maybe_store_wm_command (f);
-#endif /* HAVE_SESSION */
+#endif /* HAVE_WMCOMMAND */
 
        x_wm_hack_wm_protocols (shell_widget);
       }
@@ -2623,16 +2623,19 @@ x_focus_on_frame (struct frame *f)
 static void
 x_delete_frame (struct frame *f)
 {
-#ifndef HAVE_SESSION
+  Display *dpy;
+
+#ifndef HAVE_WMCOMMAND
   if (FRAME_X_TOP_LEVEL_FRAME_P (f))
     x_wm_maybe_move_wm_command (f);
-#endif /* HAVE_SESSION */
+#endif /* HAVE_WMCOMMAND */
 
 #ifdef HAVE_CDE
   DtDndDropUnregister (FRAME_X_TEXT_WIDGET (f));
 #endif /* HAVE_CDE */
 
   assert (FRAME_X_SHELL_WIDGET (f) != 0);
+  dpy = XtDisplay (FRAME_X_SHELL_WIDGET (f));
 
 #ifdef EXTERNAL_WIDGET
   expect_x_error (XtDisplay (FRAME_X_SHELL_WIDGET (f)));
@@ -2647,7 +2650,7 @@ x_delete_frame (struct frame *f)
   XtDestroyWidget (FRAME_X_SHELL_WIDGET (f));
   /* make sure the windows are really gone! */
   /* ### Is this REALLY necessary? */
-  XFlush (XtDisplay (FRAME_X_SHELL_WIDGET (f)));
+  XFlush (dpy);
 #endif /* EXTERNAL_WIDGET */
 
   FRAME_X_SHELL_WIDGET (f) = 0;