Mercurial > emacs
changeset 91905:6ae79e72fea7
(xfont_draw): Use BLOCK_INPUT and UNBLOCK_INPUT.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Sun, 17 Feb 2008 02:03:07 +0000 |
parents | c9a3274c0d40 |
children | a18321dbb8fa |
files | src/xfont.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xfont.c Sun Feb 17 02:02:54 2008 +0000 +++ b/src/xfont.c Sun Feb 17 02:03:07 2008 +0000 @@ -781,9 +781,11 @@ XGCValues xgcv; Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (s->f); + BLOCK_INPUT; XGetGCValues (s->display, gc, GCFont, &xgcv); if (xgcv.font != xfont->fid) XSetFont (s->display, gc, xfont->fid); + UNBLOCK_INPUT; } if (xfont->min_byte1 == 0 && xfont->max_byte1 == 0) @@ -795,22 +797,26 @@ SAFE_ALLOCA (str, char *, len); for (i = 0; i < len ; i++) str[i] = XCHAR2B_BYTE2 (s->char2b + from + i); + BLOCK_INPUT; if (with_background > 0) XDrawImageString (FRAME_X_DISPLAY (s->f), FRAME_X_WINDOW (s->f), gc, x, y, str, len); else XDrawString (FRAME_X_DISPLAY (s->f), FRAME_X_WINDOW (s->f), gc, x, y, str, len); + UNBLOCK_INPUT; SAFE_FREE (); return s->nchars; } + BLOCK_INPUT; if (with_background > 0) XDrawImageString16 (FRAME_X_DISPLAY (s->f), FRAME_X_WINDOW (s->f), gc, x, y, s->char2b + from, len); else XDrawString16 (FRAME_X_DISPLAY (s->f), FRAME_X_WINDOW (s->f), gc, x, y, s->char2b + from, len); + UNBLOCK_INPUT; return len; }