diff 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
line wrap: on
line diff
--- a/src/xfns.c	Fri Apr 09 12:04:17 2010 -0400
+++ b/src/xfns.c	Fri Apr 09 18:49:06 2010 +0200
@@ -5225,10 +5225,14 @@
   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;