Mercurial > emacs
comparison src/xterm.c @ 91237:0587b2cd9d9a
(x_check_font) [USE_FONT_BACKEND]: Don't access
dpyinfo->font_table.
(x_delete_display) [USE_FONT_BACKEND]: Likewise.
(x_delete_terminal) [USE_FONT_BACKEND]: Likewise
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 14 Dec 2007 12:52:48 +0000 |
parents | 53108e6cea98 |
children | 606f2d163a64 |
comparison
equal
deleted
inserted
replaced
91236:e3ba579aab1f | 91237:0587b2cd9d9a |
---|---|
10347 int i; | 10347 int i; |
10348 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); | 10348 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); |
10349 | 10349 |
10350 xassert (font != NULL); | 10350 xassert (font != NULL); |
10351 | 10351 |
10352 #ifdef USE_FONT_BACKEND | |
10353 if (enable_font_backend) | |
10354 /* Fixme: Perhaps we should check all cached fonts. */ | |
10355 return; | |
10356 #endif | |
10352 for (i = 0; i < dpyinfo->n_fonts; i++) | 10357 for (i = 0; i < dpyinfo->n_fonts; i++) |
10353 if (dpyinfo->font_table[i].name | 10358 if (dpyinfo->font_table[i].name |
10354 && font == dpyinfo->font_table[i].font) | 10359 && font == dpyinfo->font_table[i].font) |
10355 break; | 10360 break; |
10356 | 10361 |
11590 #ifdef HAVE_X_I18N | 11595 #ifdef HAVE_X_I18N |
11591 if (dpyinfo->xim) | 11596 if (dpyinfo->xim) |
11592 xim_close_dpy (dpyinfo); | 11597 xim_close_dpy (dpyinfo); |
11593 #endif | 11598 #endif |
11594 | 11599 |
11600 #ifdef USE_FONT_BACKEND | |
11601 if (! enable_font_backend) | |
11602 { | |
11603 #endif | |
11595 /* Free the font names in the font table. */ | 11604 /* Free the font names in the font table. */ |
11596 for (i = 0; i < dpyinfo->n_fonts; i++) | 11605 for (i = 0; i < dpyinfo->n_fonts; i++) |
11597 if (dpyinfo->font_table[i].name) | 11606 if (dpyinfo->font_table[i].name) |
11598 { | 11607 { |
11599 if (dpyinfo->font_table[i].name != dpyinfo->font_table[i].full_name) | 11608 if (dpyinfo->font_table[i].name != dpyinfo->font_table[i].full_name) |
11605 { | 11614 { |
11606 if (dpyinfo->font_table->font_encoder) | 11615 if (dpyinfo->font_table->font_encoder) |
11607 xfree (dpyinfo->font_table->font_encoder); | 11616 xfree (dpyinfo->font_table->font_encoder); |
11608 xfree (dpyinfo->font_table); | 11617 xfree (dpyinfo->font_table); |
11609 } | 11618 } |
11619 #ifdef USE_FONT_BACKEND | |
11620 } | |
11621 #endif | |
11622 | |
11610 if (dpyinfo->x_id_name) | 11623 if (dpyinfo->x_id_name) |
11611 xfree (dpyinfo->x_id_name); | 11624 xfree (dpyinfo->x_id_name); |
11612 if (dpyinfo->color_cells) | 11625 if (dpyinfo->color_cells) |
11613 xfree (dpyinfo->color_cells); | 11626 xfree (dpyinfo->color_cells); |
11614 xfree (dpyinfo); | 11627 xfree (dpyinfo); |
11714 delete_terminal calls us back when it deletes our last frame. */ | 11727 delete_terminal calls us back when it deletes our last frame. */ |
11715 if (!terminal->name) | 11728 if (!terminal->name) |
11716 return; | 11729 return; |
11717 | 11730 |
11718 BLOCK_INPUT; | 11731 BLOCK_INPUT; |
11732 #ifdef USE_FONT_BACKEND | |
11733 if (! enable_font_backend) | |
11734 #endif | |
11719 /* Free the fonts in the font table. */ | 11735 /* Free the fonts in the font table. */ |
11720 for (i = 0; i < dpyinfo->n_fonts; i++) | 11736 for (i = 0; i < dpyinfo->n_fonts; i++) |
11721 if (dpyinfo->font_table[i].name) | 11737 if (dpyinfo->font_table[i].name) |
11722 { | 11738 { |
11723 XFreeFont (dpyinfo->display, dpyinfo->font_table[i].font); | 11739 XFreeFont (dpyinfo->display, dpyinfo->font_table[i].font); |