Mercurial > emacs
comparison src/xfns.c @ 107814:0bffb2cd03fe
Fix showing the complete tip the first time, bug #2423.
* xfns.c (Fx_show_tip): Call try_window in a loop until
fonts_changed_p is zero (Bug#2423).
author | Jan D <jan.h.d@swipnet.se> |
---|---|
date | Fri, 09 Apr 2010 18:49:06 +0200 |
parents | 24c4451bcaf7 |
children | 8973aee6b80a |
comparison
equal
deleted
inserted
replaced
107813:7fe21bd6ddf8 | 107814:0bffb2cd03fe |
---|---|
5223 | 5223 |
5224 /* Display the tooltip text in a temporary buffer. */ | 5224 /* Display the tooltip text in a temporary buffer. */ |
5225 old_buffer = current_buffer; | 5225 old_buffer = current_buffer; |
5226 set_buffer_internal_1 (XBUFFER (XWINDOW (FRAME_ROOT_WINDOW (f))->buffer)); | 5226 set_buffer_internal_1 (XBUFFER (XWINDOW (FRAME_ROOT_WINDOW (f))->buffer)); |
5227 current_buffer->truncate_lines = Qnil; | 5227 current_buffer->truncate_lines = Qnil; |
5228 clear_glyph_matrix (w->desired_matrix); | 5228 |
5229 clear_glyph_matrix (w->current_matrix); | 5229 do { |
5230 SET_TEXT_POS (pos, BEGV, BEGV_BYTE); | 5230 fonts_changed_p = 0; |
5231 try_window (FRAME_ROOT_WINDOW (f), pos, 0); | 5231 clear_glyph_matrix (w->desired_matrix); |
5232 clear_glyph_matrix (w->current_matrix); | |
5233 SET_TEXT_POS (pos, BEGV, BEGV_BYTE); | |
5234 try_window (FRAME_ROOT_WINDOW (f), pos, 0); | |
5235 } while (fonts_changed_p); | |
5232 | 5236 |
5233 /* Compute width and height of the tooltip. */ | 5237 /* Compute width and height of the tooltip. */ |
5234 width = height = 0; | 5238 width = height = 0; |
5235 for (i = 0; i < w->desired_matrix->nrows; ++i) | 5239 for (i = 0; i < w->desired_matrix->nrows; ++i) |
5236 { | 5240 { |