aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-10-29 09:47:12 +0000
committerRichard M. Stallman1994-10-29 09:47:12 +0000
commit82c90203bd9250306b5ad45e724269d1190893f5 (patch)
treea3fe09399c0162b9bf9edf2ddead4832e3b0b9bc /src
parent7f9c7f949a9e137e4be310474b574003f98e51c5 (diff)
downloademacs-82c90203bd9250306b5ad45e724269d1190893f5.tar.gz
emacs-82c90203bd9250306b5ad45e724269d1190893f5.zip
(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')
-rw-r--r--src/xfns.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 8fea14d3e6b..9e508dc2eb4 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -78,13 +78,8 @@ extern void _XEditResCheckMessages ();
78 Library. */ 78 Library. */
79extern LWLIB_ID widget_id_tick; 79extern LWLIB_ID widget_id_tick;
80 80
81/* The one and only application context associated with the connection 81/* This is part of a kludge--see lwlib/xlwmenu.c. */
82 to the one and only X display that Emacs uses. */ 82XFontStruct *xlwmenu_default_font;
83XtAppContext Xt_app_con;
84
85/* The one and only application shell. Emacs screens are popup shells of this
86 application. */
87Widget Xt_app_shell;
88 83
89extern void free_frame_menubar (); 84extern void free_frame_menubar ();
90#endif /* USE_X_TOOLKIT */ 85#endif /* USE_X_TOOLKIT */
@@ -2218,9 +2213,9 @@ x_window (f, window_prompting, minibuffer_only)
2218 ac = 0; 2213 ac = 0;
2219 XtSetArg (al[ac], XtNallowShellResize, 1); ac++; 2214 XtSetArg (al[ac], XtNallowShellResize, 1); ac++;
2220 XtSetArg (al[ac], XtNinput, 1); ac++; 2215 XtSetArg (al[ac], XtNinput, 1); ac++;
2221 shell_widget = XtCreatePopupShell ("shell", 2216 shell_widget = XtAppCreateShell (name, EMACS_CLASS,
2222 topLevelShellWidgetClass, 2217 topLevelShellWidgetClass,
2223 Xt_app_shell, al, ac); 2218 FRAME_X_DISPLAY (f), al, ac);
2224 2219
2225 f->display.x->widget = shell_widget; 2220 f->display.x->widget = shell_widget;
2226 /* maybe_set_screen_title_format (shell_widget); */ 2221 /* maybe_set_screen_title_format (shell_widget); */
@@ -2672,6 +2667,10 @@ This function is an internal primitive--use `make-frame' instead.")
2672 "font", "Font", string); 2667 "font", "Font", string);
2673 } 2668 }
2674 2669
2670 /* Prevent lwlib/xlwmenu.c from crashing because of a bug
2671 whereby it fails to get any font. */
2672 xlwmenu_default_font = f->display.x->font;
2673
2675 x_default_parameter (f, parms, Qborder_width, make_number (2), 2674 x_default_parameter (f, parms, Qborder_width, make_number (2),
2676 "borderwidth", "BorderWidth", number); 2675 "borderwidth", "BorderWidth", number);
2677 /* This defaults to 2 in order to match xterm. We recognize either 2676 /* 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.")
4417 } 4416 }
4418 x_destroy_all_bitmaps (dpyinfo); 4417 x_destroy_all_bitmaps (dpyinfo);
4419 XSetCloseDownMode (dpyinfo->display, DestroyAll); 4418 XSetCloseDownMode (dpyinfo->display, DestroyAll);
4419
4420#ifdef USE_X_TOOLKIT
4421 XtCloseDisplay (dpyinfo->display);
4422#else
4420 XCloseDisplay (dpyinfo->display); 4423 XCloseDisplay (dpyinfo->display);
4424#endif
4421 4425
4422 x_delete_display (dpyinfo); 4426 x_delete_display (dpyinfo);
4423 UNBLOCK_INPUT; 4427 UNBLOCK_INPUT;