diff options
| author | YAMAMOTO Mitsuharu | 2019-06-20 11:57:50 +0900 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2019-06-20 11:58:36 +0900 |
| commit | 0701634aa788b316f331ccbb6c44dfd8304a271d (patch) | |
| tree | 72bac97d44b72b218b37b51c2f63fe4bffafbc7a /src/xsettings.c | |
| parent | 9eb78866476d843889361ca725e6cbd48d06c2fc (diff) | |
| download | emacs-0701634aa788b316f331ccbb6c44dfd8304a271d.tar.gz emacs-0701634aa788b316f331ccbb6c44dfd8304a271d.zip | |
Fix failure of setting default face attribute in init script (Bug#36284)
* src/xsettings.c (apply_xft_settings): Undo replacing all #ifdef HAVE_XFT
with #if defined USE_CAIRO || defined HAVE_XFT for this function.
Diffstat (limited to 'src/xsettings.c')
| -rw-r--r-- | src/xsettings.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/xsettings.c b/src/xsettings.c index 3e9012e3ab1..06c47c6c6ce 100644 --- a/src/xsettings.c +++ b/src/xsettings.c | |||
| @@ -608,18 +608,16 @@ static void | |||
| 608 | apply_xft_settings (struct x_display_info *dpyinfo, | 608 | apply_xft_settings (struct x_display_info *dpyinfo, |
| 609 | struct xsettings *settings) | 609 | struct xsettings *settings) |
| 610 | { | 610 | { |
| 611 | #if defined USE_CAIRO || defined HAVE_XFT | 611 | #ifdef HAVE_XFT |
| 612 | FcPattern *pat; | 612 | FcPattern *pat; |
| 613 | struct xsettings oldsettings; | 613 | struct xsettings oldsettings; |
| 614 | bool changed = false; | 614 | bool changed = false; |
| 615 | 615 | ||
| 616 | memset (&oldsettings, 0, sizeof (oldsettings)); | 616 | memset (&oldsettings, 0, sizeof (oldsettings)); |
| 617 | pat = FcPatternCreate (); | 617 | pat = FcPatternCreate (); |
| 618 | #ifdef HAVE_XFT | ||
| 619 | XftDefaultSubstitute (dpyinfo->display, | 618 | XftDefaultSubstitute (dpyinfo->display, |
| 620 | XScreenNumberOfScreen (dpyinfo->screen), | 619 | XScreenNumberOfScreen (dpyinfo->screen), |
| 621 | pat); | 620 | pat); |
| 622 | #endif | ||
| 623 | FcPatternGetBool (pat, FC_ANTIALIAS, 0, &oldsettings.aa); | 621 | FcPatternGetBool (pat, FC_ANTIALIAS, 0, &oldsettings.aa); |
| 624 | FcPatternGetBool (pat, FC_HINTING, 0, &oldsettings.hinting); | 622 | FcPatternGetBool (pat, FC_HINTING, 0, &oldsettings.hinting); |
| 625 | #ifdef FC_HINT_STYLE | 623 | #ifdef FC_HINT_STYLE |
| @@ -719,9 +717,7 @@ apply_xft_settings (struct x_display_info *dpyinfo, | |||
| 719 | }; | 717 | }; |
| 720 | char buf[sizeof format + d_formats * d_growth + lf_formats * lf_growth]; | 718 | char buf[sizeof format + d_formats * d_growth + lf_formats * lf_growth]; |
| 721 | 719 | ||
| 722 | #ifdef HAVE_XFT | ||
| 723 | XftDefaultSet (dpyinfo->display, pat); | 720 | XftDefaultSet (dpyinfo->display, pat); |
| 724 | #endif | ||
| 725 | store_config_changed_event (Qfont_render, | 721 | store_config_changed_event (Qfont_render, |
| 726 | XCAR (dpyinfo->name_list_element)); | 722 | XCAR (dpyinfo->name_list_element)); |
| 727 | Vxft_settings | 723 | Vxft_settings |
| @@ -733,7 +729,7 @@ apply_xft_settings (struct x_display_info *dpyinfo, | |||
| 733 | } | 729 | } |
| 734 | else | 730 | else |
| 735 | FcPatternDestroy (pat); | 731 | FcPatternDestroy (pat); |
| 736 | #endif /* USE_CAIRO || HAVE_XFT */ | 732 | #endif /* HAVE_XFT */ |
| 737 | } | 733 | } |
| 738 | 734 | ||
| 739 | /* Read XSettings from the display for DPYINFO. | 735 | /* Read XSettings from the display for DPYINFO. |