Mercurial > emacs
comparison src/xterm.c @ 15904:a31cfab57f69
(x_term_init): If the default Xt font does not exist on
the X server, add a resource so that dialog boxes use a common font.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 24 Aug 1996 00:03:22 +0000 |
parents | 3afa38a18102 |
children | 1f39e8812915 |
comparison
equal
deleted
inserted
replaced
15903:0a93a0afdd74 | 15904:a31cfab57f69 |
---|---|
6106 #ifdef SIGIO | 6106 #ifdef SIGIO |
6107 if (interrupt_input) | 6107 if (interrupt_input) |
6108 init_sigio (connection); | 6108 init_sigio (connection); |
6109 #endif /* ! defined (SIGIO) */ | 6109 #endif /* ! defined (SIGIO) */ |
6110 | 6110 |
6111 #ifdef USE_LUCID | |
6112 /* Make sure that we have a valid font for dialog boxes | |
6113 so that Xt does not crash. */ | |
6114 { | |
6115 Display *dpy = dpyinfo->display; | |
6116 XrmValue d, fr, to; | |
6117 Font font; | |
6118 | |
6119 d.addr = (XPointer)&dpy; | |
6120 d.size = sizeof (Display *); | |
6121 fr.addr = XtDefaultFont; | |
6122 fr.size = sizeof (XtDefaultFont); | |
6123 to.size = sizeof (Font *); | |
6124 to.addr = (XPointer)&font; | |
6125 x_catch_errors (dpy); | |
6126 if (!XtCallConverter (dpy, XtCvtStringToFont, &d, 1, &fr, &to, NULL)) | |
6127 abort (); | |
6128 if (x_had_errors_p (dpy) || !XQueryFont (dpy, font)) | |
6129 XrmPutLineResource (&xrdb, "Emacs.dialog.*.font: 9x15"); | |
6130 x_uncatch_errors (dpy); | |
6131 } | |
6132 #endif | |
6133 | |
6134 | |
6111 UNBLOCK_INPUT; | 6135 UNBLOCK_INPUT; |
6112 | 6136 |
6113 return dpyinfo; | 6137 return dpyinfo; |
6114 } | 6138 } |
6115 | 6139 |