]> code.delx.au - gnu-emacs/blobdiff - src/xfns.c
Fix glitch in scrolling_window (backport from trunk).
[gnu-emacs] / src / xfns.c
index 5979c81e7b71feaee2eaf97a0354babc204b8b44..44d8fb31f2e0b026676c09d7816e1a347acbb967 100644 (file)
@@ -1,6 +1,6 @@
 /* Functions for the X window system.
    Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-                 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+                 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
                  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -645,11 +645,10 @@ x_real_positions (f, xptr, yptr)
         {
           int ign;
           Window rootw;
+          long *fe = (long *)tmp_data;
 
           XGetGeometry (FRAME_X_DISPLAY (f), win,
                         &rootw, &real_x, &real_y, &ign, &ign, &ign, &ign);
-          long *fe = (long *)tmp_data;
-      
           outer_x = -fe[0];
           outer_y = -fe[2];
           real_x -= fe[0];
@@ -5221,14 +5220,10 @@ 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;
-
-  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);
+  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, TRY_WINDOW_IGNORE_FONTS_CHANGE);
 
   /* Compute width and height of the tooltip.  */
   width = height = 0;