emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100160: Backport fix for Bug#2423


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100160: Backport fix for Bug#2423 from trunk.
Date: Thu, 04 Nov 2010 15:39:47 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100160 [merge]
author: YAMAMOTO Mitsuharu <address@hidden>
committer: Chong Yidong <address@hidden>
branch nick: emacs-23
timestamp: Thu 2010-11-04 15:39:47 -0400
message:
  Backport fix for Bug#2423 from trunk.
  
  * dispextern.h (TRY_WINDOW_CHECK_MARGINS)
  (TRY_WINDOW_IGNORE_FONTS_CHANGE): New defines.
  
  * xdisp.c (try_window): Change arg from CHECK_MARGINS to FLAGS.
  Don't abort with fonts change if TRY_WINDOW_IGNORE_FONTS_CHANGE is
  set in FLAGS.  Callers with non-zero CHECK_MARGINS changed to use
  TRY_WINDOW_CHECK_MARGINS.
  
  * xfns.c (Fx_show_tip): Undo last change.  Call try_window with
  TRY_WINDOW_IGNORE_FONTS_CHANGE (Bug#2423).
modified:
  src/ChangeLog
  src/dispextern.h
  src/xdisp.c
  src/xfns.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-11-04 12:37:17 +0000
+++ b/src/ChangeLog     2010-11-04 19:39:47 +0000
@@ -1,3 +1,16 @@
+2010-11-04  YAMAMOTO Mitsuharu  <address@hidden>
+
+       * dispextern.h (TRY_WINDOW_CHECK_MARGINS)
+       (TRY_WINDOW_IGNORE_FONTS_CHANGE): New defines.
+
+       * xdisp.c (try_window): Change arg from CHECK_MARGINS to FLAGS.
+       Don't abort with fonts change if TRY_WINDOW_IGNORE_FONTS_CHANGE is
+       set in FLAGS.  Callers with non-zero CHECK_MARGINS changed to use
+       TRY_WINDOW_CHECK_MARGINS.
+
+       * xfns.c (Fx_show_tip): Undo last change.  Call try_window with
+       TRY_WINDOW_IGNORE_FONTS_CHANGE (Bug#2423).
+
 2010-11-04  Jan Djärv  <address@hidden>
 
        * xfns.c (x_real_positions): Only use _NET_FRAME_EXTENTS if our

=== modified file 'src/dispextern.h'
--- a/src/dispextern.h  2010-10-12 15:16:57 +0000
+++ b/src/dispextern.h  2010-11-04 19:35:32 +0000
@@ -2841,6 +2841,10 @@
                                       XRectangle *));
 #endif
 
+/* Flags passed to try_window.  */
+#define TRY_WINDOW_CHECK_MARGINS       (1 << 0)
+#define TRY_WINDOW_IGNORE_FONTS_CHANGE (1 << 1)
+
 /* Defined in fringe.c */
 
 int lookup_fringe_bitmap (Lisp_Object);

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2010-08-31 07:49:21 +0000
+++ b/src/xdisp.c       2010-11-04 19:35:32 +0000
@@ -13577,7 +13577,7 @@
               = try_window_reusing_current_matrix (w)))
        {
          IF_DEBUG (debug_method_add (w, "1"));
-         if (try_window (window, startp, 1) < 0)
+         if (try_window (window, startp, TRY_WINDOW_CHECK_MARGINS) < 0)
            /* -1 means we need to scroll.
               0 means we need new matrices, but fonts_changed_p
               is set in that case, so we will detect it below.  */
@@ -13936,13 +13936,15 @@
    Value is 1 if successful.  It is zero if fonts were loaded during
    redisplay which makes re-adjusting glyph matrices necessary, and -1
    if point would appear in the scroll margins.
-   (We check that only if CHECK_MARGINS is nonzero.  */
+   (We check the former only if TRY_WINDOW_IGNORE_FONTS_CHANGE is
+   unset in FLAGS, and the latter only if TRY_WINDOW_CHECK_MARGINS is
+   set in FLAGS.)  */
 
 int
-try_window (window, pos, check_margins)
+try_window (window, pos, flags)
      Lisp_Object window;
      struct text_pos pos;
-     int check_margins;
+     int flags;
 {
   struct window *w = XWINDOW (window);
   struct it it;
@@ -13964,12 +13966,12 @@
     {
       if (display_line (&it))
        last_text_row = it.glyph_row - 1;
-      if (fonts_changed_p)
+      if (fonts_changed_p && !(flags & TRY_WINDOW_IGNORE_FONTS_CHANGE))
        return 0;
     }
 
   /* Don't let the cursor end in the scroll margins.  */
-  if (check_margins
+  if ((flags & TRY_WINDOW_CHECK_MARGINS)
       && !MINI_WINDOW_P (w))
     {
       int this_scroll_margin;

=== modified file 'src/xfns.c'
--- a/src/xfns.c        2010-11-04 12:37:17 +0000
+++ b/src/xfns.c        2010-11-04 19:35:32 +0000
@@ -5224,7 +5224,7 @@
   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);
+  try_window (FRAME_ROOT_WINDOW (f), pos, TRY_WINDOW_IGNORE_FONTS_CHANGE);
 
   /* Compute width and height of the tooltip.  */
   width = height = 0;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]