aboutsummaryrefslogtreecommitdiffstats
path: root/src/xftfont.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xftfont.c')
-rw-r--r--src/xftfont.c63
1 files changed, 35 insertions, 28 deletions
diff --git a/src/xftfont.c b/src/xftfont.c
index e27c6cf3146..31fb877c35b 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -643,18 +643,23 @@ xftfont_end_for_frame (struct frame *f)
643 return 0; 643 return 0;
644} 644}
645 645
646/* When using X double buffering, the XftDraw structure we build 646/* When using X double buffering, the XRender surfaces we create seem
647 seems to be useless once a frame is resized, so recreate it on 647 to become useless once the window acting as the front buffer is
648 resized for an unknown reason (X server bug?), so recreate it on
648 ConfigureNotify and in some other cases. */ 649 ConfigureNotify and in some other cases. */
649 650
651#ifdef HAVE_XDBE
650static void 652static void
651xftfont_drop_xrender_surfaces (struct frame *f) 653xftfont_drop_xrender_surfaces (struct frame *f)
652{ 654{
653 block_input ();
654 if (FRAME_X_DOUBLE_BUFFERED_P (f)) 655 if (FRAME_X_DOUBLE_BUFFERED_P (f))
655 xftfont_end_for_frame (f); 656 {
656 unblock_input (); 657 block_input ();
658 xftfont_end_for_frame (f);
659 unblock_input ();
660 }
657} 661}
662#endif
658 663
659static bool 664static bool
660xftfont_cached_font_ok (struct frame *f, Lisp_Object font_object, 665xftfont_cached_font_ok (struct frame *f, Lisp_Object font_object,
@@ -741,35 +746,37 @@ static void syms_of_xftfont_for_pdumper (void);
741struct font_driver const xftfont_driver = 746struct font_driver const xftfont_driver =
742 { 747 {
743 /* We can't draw a text without device dependent functions. */ 748 /* We can't draw a text without device dependent functions. */
744 .type = LISPSYM_INITIALLY (Qxft), 749 .type = LISPSYM_INITIALLY (Qxft),
745 .get_cache = xfont_get_cache, 750 .get_cache = xfont_get_cache,
746 .list = xftfont_list, 751 .list = xftfont_list,
747 .match = xftfont_match, 752 .match = xftfont_match,
748 .list_family = ftfont_list_family, 753 .list_family = ftfont_list_family,
749 .open_font = xftfont_open, 754 .open_font = xftfont_open,
750 .close_font = xftfont_close, 755 .close_font = xftfont_close,
751 .prepare_face = xftfont_prepare_face, 756 .prepare_face = xftfont_prepare_face,
752 .done_face = xftfont_done_face, 757 .done_face = xftfont_done_face,
753 .has_char = xftfont_has_char, 758 .has_char = xftfont_has_char,
754 .encode_char = xftfont_encode_char, 759 .encode_char = xftfont_encode_char,
755 .text_extents = xftfont_text_extents, 760 .text_extents = xftfont_text_extents,
756 .draw = xftfont_draw, 761 .draw = xftfont_draw,
757 .get_bitmap = ftfont_get_bitmap, 762 .get_bitmap = ftfont_get_bitmap,
758 .anchor_point = ftfont_anchor_point, 763 .anchor_point = ftfont_anchor_point,
759#ifdef HAVE_LIBOTF 764#ifdef HAVE_LIBOTF
760 .otf_capability = ftfont_otf_capability, 765 .otf_capability = ftfont_otf_capability,
761#endif 766#endif
762 .end_for_frame = xftfont_end_for_frame, 767 .end_for_frame = xftfont_end_for_frame,
763#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF 768#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF
764 .shape = xftfont_shape, 769 .shape = xftfont_shape,
765#endif 770#endif
766#if defined HAVE_OTF_GET_VARIATION_GLYPHS || defined HAVE_FT_FACE_GETCHARVARIANTINDEX 771#if defined HAVE_OTF_GET_VARIATION_GLYPHS || defined HAVE_FT_FACE_GETCHARVARIANTINDEX
767 .get_variation_glyphs = ftfont_variation_glyphs, 772 .get_variation_glyphs = ftfont_variation_glyphs,
773#endif
774 .filter_properties = ftfont_filter_properties,
775 .cached_font_ok = xftfont_cached_font_ok,
776 .combining_capability = ftfont_combining_capability,
777#ifdef HAVE_XDBE
778 .drop_xrender_surfaces = xftfont_drop_xrender_surfaces,
768#endif 779#endif
769 .filter_properties = ftfont_filter_properties,
770 .cached_font_ok = xftfont_cached_font_ok,
771 .combining_capability = ftfont_combining_capability,
772 .drop_xrender_surfaces = xftfont_drop_xrender_surfaces,
773 }; 780 };
774#ifdef HAVE_HARFBUZZ 781#ifdef HAVE_HARFBUZZ
775struct font_driver xfthbfont_driver; 782struct font_driver xfthbfont_driver;