X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fframe-x.c;h=2aa7d59c28bbaa12e8ce2f4346996d911228f642;hb=2416430cb588c7f7a7ca990d536c092f3af3a0b9;hp=a5d62c6fd9b85a5842edf9725fd12a77999c748c;hpb=cb9f6f4eadc44f1becb32cbbd1db26449e347755;p=chise%2Fxemacs-chise.git.1 diff --git a/src/frame-x.c b/src/frame-x.c index a5d62c6..2aa7d59 100644 --- a/src/frame-x.c +++ b/src/frame-x.c @@ -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;