diff options
| author | Dmitry Antipov | 2013-10-25 10:55:36 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-10-25 10:55:36 +0400 |
| commit | 78e0b35c45892995da596c65759fdece3e67129d (patch) | |
| tree | 4e18a2b9f5703f8eb4c7151fc061f4c13892432e /src/xftfont.c | |
| parent | 963ce6361af7f8b7aefb63e7a50956e497020b12 (diff) | |
| download | emacs-78e0b35c45892995da596c65759fdece3e67129d.tar.gz emacs-78e0b35c45892995da596c65759fdece3e67129d.zip | |
Omit unused frame argument of font API's close function.
* font.h (struct font): Drop frame argument. Adjust comment.
* font.c (font_clear_cache, font_close_object): Adjust users.
* ftfont.c (ftfont_close):
* ftxfont.c (ftxfont_close):
* macfont.m (macfont_close):
* nsfont.m (nsfont_close):
* w32font.c (w32font_close):
* xfont.c (xfont_close):
* xftfont.c (xftfont_close): Adjust driver-specific close
functions, tweak comments and make functions safe if called
more than once for the same font object.
Diffstat (limited to 'src/xftfont.c')
| -rw-r--r-- | src/xftfont.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/xftfont.c b/src/xftfont.c index f2b4c2abe2b..1e03dd320fe 100644 --- a/src/xftfont.c +++ b/src/xftfont.c | |||
| @@ -486,18 +486,26 @@ xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size) | |||
| 486 | } | 486 | } |
| 487 | 487 | ||
| 488 | static void | 488 | static void |
| 489 | xftfont_close (struct frame *f, struct font *font) | 489 | xftfont_close (struct font *font) |
| 490 | { | 490 | { |
| 491 | struct xftfont_info *xftfont_info = (struct xftfont_info *) font; | 491 | struct xftfont_info *xftfont_info = (struct xftfont_info *) font; |
| 492 | 492 | ||
| 493 | #ifdef HAVE_LIBOTF | 493 | #ifdef HAVE_LIBOTF |
| 494 | if (xftfont_info->otf) | 494 | if (xftfont_info->otf) |
| 495 | OTF_close (xftfont_info->otf); | 495 | { |
| 496 | OTF_close (xftfont_info->otf); | ||
| 497 | xftfont_info->otf = NULL; | ||
| 498 | } | ||
| 496 | #endif | 499 | #endif |
| 497 | block_input (); | 500 | |
| 498 | XftUnlockFace (xftfont_info->xftfont); | 501 | if (xftfont_info->xftfont) |
| 499 | XftFontClose (xftfont_info->display, xftfont_info->xftfont); | 502 | { |
| 500 | unblock_input (); | 503 | block_input (); |
| 504 | XftUnlockFace (xftfont_info->xftfont); | ||
| 505 | XftFontClose (xftfont_info->display, xftfont_info->xftfont); | ||
| 506 | unblock_input (); | ||
| 507 | xftfont_info->xftfont = NULL; | ||
| 508 | } | ||
| 501 | } | 509 | } |
| 502 | 510 | ||
| 503 | static int | 511 | static int |