diff options
author | Alexander Gramiak <agrambot@gmail.com> | 2019-05-08 21:40:24 -0600 |
---|---|---|
committer | Alexander Gramiak <agrambot@gmail.com> | 2019-05-10 17:26:12 -0600 |
commit | 6bfc5fc6c4dfbed4b07528b64414fb04675cdf79 (patch) | |
tree | 5af86da74727a0de4eeb190d634aa7b172d42242 /src/xfont.c | |
parent | 655634808ad3b324ab844c53006e648b45713364 (diff) | |
download | emacs-6bfc5fc6c4dfbed4b07528b64414fb04675cdf79.tar.gz emacs-6bfc5fc6c4dfbed4b07528b64414fb04675cdf79.tar.bz2 emacs-6bfc5fc6c4dfbed4b07528b64414fb04675cdf79.zip |
Remove display member of glyph_string
This member has little value even on X, and it leaks internal backend
details to the glyph_string struct.
* src/dispextern.h (glyph_string): Remove X display member.
* src/xdisp.c (init_glyph_string): Remove initialization of display.
* src/xfont.c (xfont_draw):
* src/xterm.c: Use FRAME_X_DISPLAY (s->f) instead of display member.
Diffstat (limited to 'src/xfont.c')
-rw-r--r-- | src/xfont.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/xfont.c b/src/xfont.c index 5ecbd6de33b..ff80df407d7 100644 --- a/src/xfont.c +++ b/src/xfont.c @@ -1000,6 +1000,7 @@ xfont_draw (struct glyph_string *s, int from, int to, int x, int y, bool with_background) { XFontStruct *xfont = ((struct xfont_info *) s->font)->xfont; + Display *display = FRAME_X_DISPLAY (s->f); int len = to - from; GC gc = s->gc; int i; @@ -1007,7 +1008,7 @@ xfont_draw (struct glyph_string *s, int from, int to, int x, int y, if (s->gc != s->face->gc) { block_input (); - XSetFont (s->display, gc, xfont->fid); + XSetFont (display, gc, xfont->fid); unblock_input (); } @@ -1022,20 +1023,20 @@ xfont_draw (struct glyph_string *s, int from, int to, int x, int y, { if (s->padding_p) for (i = 0; i < len; i++) - XDrawImageString (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f), + XDrawImageString (display, FRAME_X_DRAWABLE (s->f), gc, x + i, y, str + i, 1); else - XDrawImageString (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f), + XDrawImageString (display, FRAME_X_DRAWABLE (s->f), gc, x, y, str, len); } else { if (s->padding_p) for (i = 0; i < len; i++) - XDrawString (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f), + XDrawString (display, FRAME_X_DRAWABLE (s->f), gc, x + i, y, str + i, 1); else - XDrawString (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f), + XDrawString (display, FRAME_X_DRAWABLE (s->f), gc, x, y, str, len); } unblock_input (); @@ -1048,20 +1049,20 @@ xfont_draw (struct glyph_string *s, int from, int to, int x, int y, { if (s->padding_p) for (i = 0; i < len; i++) - XDrawImageString16 (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f), + XDrawImageString16 (display, FRAME_X_DRAWABLE (s->f), gc, x + i, y, s->char2b + from + i, 1); else - XDrawImageString16 (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f), + XDrawImageString16 (display, FRAME_X_DRAWABLE (s->f), gc, x, y, s->char2b + from, len); } else { if (s->padding_p) for (i = 0; i < len; i++) - XDrawString16 (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f), + XDrawString16 (display, FRAME_X_DRAWABLE (s->f), gc, x + i, y, s->char2b + from + i, 1); else - XDrawString16 (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f), + XDrawString16 (display, FRAME_X_DRAWABLE (s->f), gc, x, y, s->char2b + from, len); } unblock_input (); |