aboutsummaryrefslogtreecommitdiffstats
path: root/src/xfns.c
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1994-10-29 09:47:12 +0000
committerRichard M. Stallman <[email protected]>1994-10-29 09:47:12 +0000
commit82c90203bd9250306b5ad45e724269d1190893f5 (patch)
treea3fe09399c0162b9bf9edf2ddead4832e3b0b9bc /src/xfns.c
parent7f9c7f949a9e137e4be310474b574003f98e51c5 (diff)
(Fx_create_frame): Set xlwmenu_default_font.
[USE_X_TOOLKIT] (x_window): Use XtAppCreateShell. (Xt_app_shell, Xt_app_con): Variables deleted. (Fx_close_connection) [USE_X_TOOLKIT]: Call XtCloseDisplay.
Diffstat (limited to 'src/xfns.c')
-rw-r--r--src/xfns.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 8fea14d3e6..9e508dc2eb 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -78,13 +78,8 @@ extern void _XEditResCheckMessages ();
Library. */
extern LWLIB_ID widget_id_tick;
-/* The one and only application context associated with the connection
- to the one and only X display that Emacs uses. */
-XtAppContext Xt_app_con;
-
-/* The one and only application shell. Emacs screens are popup shells of this
- application. */
-Widget Xt_app_shell;
+/* This is part of a kludge--see lwlib/xlwmenu.c. */
+XFontStruct *xlwmenu_default_font;
extern void free_frame_menubar ();
#endif /* USE_X_TOOLKIT */
@@ -2218,9 +2213,9 @@ x_window (f, window_prompting, minibuffer_only)
ac = 0;
XtSetArg (al[ac], XtNallowShellResize, 1); ac++;
XtSetArg (al[ac], XtNinput, 1); ac++;
- shell_widget = XtCreatePopupShell ("shell",
- topLevelShellWidgetClass,
- Xt_app_shell, al, ac);
+ shell_widget = XtAppCreateShell (name, EMACS_CLASS,
+ topLevelShellWidgetClass,
+ FRAME_X_DISPLAY (f), al, ac);
f->display.x->widget = shell_widget;
/* maybe_set_screen_title_format (shell_widget); */
@@ -2672,6 +2667,10 @@ This function is an internal primitive--use `make-frame' instead.")
"font", "Font", string);
}
+ /* Prevent lwlib/xlwmenu.c from crashing because of a bug
+ whereby it fails to get any font. */
+ xlwmenu_default_font = f->display.x->font;
+
x_default_parameter (f, parms, Qborder_width, make_number (2),
"borderwidth", "BorderWidth", number);
/* This defaults to 2 in order to match xterm. We recognize either
@@ -4417,7 +4416,12 @@ If DISPLAY is nil, that stands for the selected frame's display.")
}
x_destroy_all_bitmaps (dpyinfo);
XSetCloseDownMode (dpyinfo->display, DestroyAll);
+
+#ifdef USE_X_TOOLKIT
+ XtCloseDisplay (dpyinfo->display);
+#else
XCloseDisplay (dpyinfo->display);
+#endif
x_delete_display (dpyinfo);
UNBLOCK_INPUT;