aboutsummaryrefslogtreecommitdiffstats
path: root/src/xrdb.c
diff options
context:
space:
mode:
authorJan Djärv2011-02-14 18:21:10 +0100
committerJan Djärv2011-02-14 18:21:10 +0100
commit3928f2b67e69cd22995558cc205a2fc6aa33d477 (patch)
tree1a384801162ad5afaa0e5fa7f4e8f0cb023d8d60 /src/xrdb.c
parent4bb81cc2ba5b44f97b14f7c7ae0dd6b972e71677 (diff)
downloademacs-3928f2b67e69cd22995558cc205a2fc6aa33d477.tar.gz
emacs-3928f2b67e69cd22995558cc205a2fc6aa33d477.zip
Use *font for Xft font names for Lucid menus and dialogs.
* doc/emacs/xresources.texi (X Resources): Remove *faceName and replace it with *font for Lucid. * lwlib/lwlib-Xaw.c (make_dialog): Use *font even for Xft fonts. Try XLoadQueryFont first and then Xft fonts. * lwlib/xlwmenu.c (xlwmenu_default_font): Remove, does not work for multi-display. (xlwMenuResources): Remove XtNfaceName and XtNdefaultFace. Make XtNFont a String resource. (make_windows_if_needed): Call XFlush so later changes are seen by the X server. (remap_menubar): Use XtMoveWidget and then XtResizeWidget/XtResizeWindow after XtPopup. Works better with Compiz. (make_drawing_gcs): Check if mw->menu.font is set. (getDefaultXftFont): New function. (openXftFont): faceName is now fontName. Try XLoadQueryFont first and then XftFontOpenName. (XlwMenuInitialize): Initialize mw->menu.font with XLoadQueryFont. (XlwMenuClassInitialize): Remove initialization of xlwmenu_default_font. (fontname_changed): Renamed from facename_changed. (XlwMenuSetValues): Use facename_changed. * lwlib/xlwmenu.h: Remove Xt[CN]faceName and Xt[NC]defaultFace. * lwlib/xlwmenuP.h (_XlwMenu_part): Remove faceName. Add fontName. * src/xmenu.c (apply_systemfont_to_dialog): Apply to *dialog.font. (apply_systemfont_to_menu): Set resources *menubar*font and *popup*font. Remove defflt. (set_frame_menubar, create_and_show_popup_menu): Call apply_systemfont_to_menu before lw_create_widget. * src/xrdb.c (x_load_resources): For LUCID and XFT, don't put a resource that specifies helvetica for menus and dialogs.
Diffstat (limited to 'src/xrdb.c')
-rw-r--r--src/xrdb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xrdb.c b/src/xrdb.c
index 90afe32bb66..01714900752 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -546,12 +546,14 @@ x_load_resources (Display *display, const char *xrm_string,
546 546
547#else /* not USE_MOTIF */ 547#else /* not USE_MOTIF */
548 548
549 sprintf (line, "Emacs.dialog*.font: %s", helv);
550 XrmPutLineResource (&rdb, line);
551 sprintf (line, "Emacs.dialog*.background: grey75"); 549 sprintf (line, "Emacs.dialog*.background: grey75");
552 XrmPutLineResource (&rdb, line); 550 XrmPutLineResource (&rdb, line);
551#if !defined (HAVE_XFT) || !defined (USE_LUCID)
552 sprintf (line, "Emacs.dialog*.font: %s", helv);
553 XrmPutLineResource (&rdb, line);
553 sprintf (line, "*XlwMenu*font: %s", helv); 554 sprintf (line, "*XlwMenu*font: %s", helv);
554 XrmPutLineResource (&rdb, line); 555 XrmPutLineResource (&rdb, line);
556#endif
555 sprintf (line, "*XlwMenu*background: grey75"); 557 sprintf (line, "*XlwMenu*background: grey75");
556 XrmPutLineResource (&rdb, line); 558 XrmPutLineResource (&rdb, line);
557 sprintf (line, "Emacs*verticalScrollBar.background: grey75"); 559 sprintf (line, "Emacs*verticalScrollBar.background: grey75");