From: Chong Yidong Date: Thu, 4 Nov 2010 19:34:11 +0000 (-0400) Subject: Backport from trunk. X-Git-Tag: emacs-pretest-23.2.90~20^2~2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c698128618583af08186c80dfc949dedf73f3b07;p=emacs.git Backport from trunk. --- diff --git a/src/ChangeLog b/src/ChangeLog index a16e35df108..b4c9cbcc159 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-04-09 Jan Djärv + + * xfns.c (Fx_show_tip): Call try_window in a loop until + fonts_changed_p is zero (Bug#2423). + 2010-11-04 Jan Djärv * xfns.c (x_real_positions): Only use _NET_FRAME_EXTENTS if our diff --git a/src/xfns.c b/src/xfns.c index 635264ea862..5979c81e7b7 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -5221,10 +5221,14 @@ Text larger than the specified size is clipped. */) old_buffer = current_buffer; set_buffer_internal_1 (XBUFFER (XWINDOW (FRAME_ROOT_WINDOW (f))->buffer)); current_buffer->truncate_lines = Qnil; - clear_glyph_matrix (w->desired_matrix); - clear_glyph_matrix (w->current_matrix); - SET_TEXT_POS (pos, BEGV, BEGV_BYTE); - try_window (FRAME_ROOT_WINDOW (f), pos, 0); + + do { + fonts_changed_p = 0; + clear_glyph_matrix (w->desired_matrix); + clear_glyph_matrix (w->current_matrix); + SET_TEXT_POS (pos, BEGV, BEGV_BYTE); + try_window (FRAME_ROOT_WINDOW (f), pos, 0); + } while (fonts_changed_p); /* Compute width and height of the tooltip. */ width = height = 0;