Mercurial > emacs
changeset 90426:e9ed7d437c21
(xftfont_default_fid): Set fid_known to 1.
(struct xftdraw_list, xftdraw_list): Delete them.
(register_xftdraw, check_xftdraw): Delete them.
(xftfont_prepare_face): Don't call register_xftdraw.
(xftfont_done_face): Don't call check_xftdraw.
(xftfont_draw): Get backroudn color only when with_background is
nonzero.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 07 Jun 2006 06:37:23 +0000 |
parents | 5976e428d68e |
children | ddb25860d044 |
files | src/xftfont.c |
diffstat | 1 files changed, 2 insertions(+), 51 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xftfont.c Wed Jun 07 06:35:31 2006 +0000 +++ b/src/xftfont.c Wed Jun 07 06:37:23 2006 +0000 @@ -147,6 +147,7 @@ if (! fid) abort (); } + fid_known = 1; } return fid; } @@ -336,53 +337,6 @@ FRAME_X_DISPLAY_INFO (f)->n_fonts--; } -struct xftdraw_list -{ - XftDraw *xftdraw; - struct xftdraw_list *next; -}; - -static struct xftdraw_list *xftdraw_list; - -static void -register_xftdraw (xftdraw) - XftDraw *xftdraw; -{ - struct xftdraw_list *list = malloc (sizeof (struct xftdraw_list)); - - list->xftdraw = xftdraw; - list->next = xftdraw_list; - xftdraw_list = list; -} - -static void -check_xftdraw (xftdraw) - XftDraw *xftdraw; -{ - struct xftdraw_list *list, *prev; - - for (list = xftdraw_list, prev = NULL; list; prev = list, list = list->next) - { - if (list->xftdraw == xftdraw) - { - if (! prev) - { - list = xftdraw_list->next; - free (xftdraw_list); - xftdraw_list = list; - } - else - { - prev->next = list->next; - free (list); - list = prev; - } - return; - } - } - abort (); -} - static int xftfont_prepare_face (f, face) FRAME_PTR f; @@ -398,8 +352,6 @@ FRAME_X_WINDOW (f), FRAME_X_VISUAL (f), FRAME_X_COLORMAP (f)); - register_xftdraw (xftface_info->xft_draw); - xftfont_get_colors (f, face, face->gc, NULL, &xftface_info->xft_fg, &xftface_info->xft_bg); UNBLOCK_INPUT; @@ -418,7 +370,6 @@ if (xftface_info) { BLOCK_INPUT; - check_xftdraw (xftface_info->xft_draw); XftDrawDestroy (xftface_info->xft_draw); UNBLOCK_INPUT; free (xftface_info); @@ -479,7 +430,7 @@ int i; xftfont_get_colors (f, face, s->gc, xftface_info, - &fg, s->width ? &bg : NULL); + &fg, with_background ? &bg : NULL); BLOCK_INPUT; if (s->clip_width) {