]> code.delx.au - gnu-emacs/blobdiff - src/dispnew.c
*** empty log message ***
[gnu-emacs] / src / dispnew.c
index 69e495d8d8b0ca5050c58a01e396fc82357a44a3..63a8a3a313f67c9ff9cdccde391db3ba96a94182 100644 (file)
@@ -1,6 +1,6 @@
 /* Updating of data structures for redisplay.
-   Copyright (C) 1985,86,87,88,93,94,95,97,98,1999,2000,01,02,03,04
-       Free Software Foundation, Inc.
+   Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1997, 1998, 1999,
+     2000, 2001, 2002, 2003, 2004, 2005  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -2777,6 +2777,7 @@ build_frame_matrix_from_leaf_window (frame_matrix, w)
              SET_CHAR_GLYPH_FROM_GLYPH (*border, right_border_glyph);
            }
 
+#if GLYPH_DEBUG
          /* Window row window_y must be a slice of frame row
             frame_y.  */
          xassert (glyph_row_slice_p (window_row, frame_row));
@@ -2784,7 +2785,6 @@ build_frame_matrix_from_leaf_window (frame_matrix, w)
          /* If rows are in sync, we don't have to copy glyphs because
             frame and window share glyphs.  */
 
-#if GLYPH_DEBUG
          strcpy (w->current_matrix->method, w->desired_matrix->method);
          add_window_display_history (w, w->current_matrix->method, 0);
 #endif
@@ -4065,17 +4065,17 @@ update_window (w, force_p)
   extern Lisp_Object do_mouse_tracking;
 #if GLYPH_DEBUG
   struct frame *f = XFRAME (WINDOW_FRAME (w));
-#endif
 
   /* Check that W's frame doesn't have glyph matrices.  */
   xassert (FRAME_WINDOW_P (f));
   xassert (updating_frame != NULL);
+#endif
 
   /* Check pending input the first time so that we can quickly return.  */
   if (redisplay_dont_pause)
     force_p = 1;
   else
-    detect_input_pending ();
+    detect_input_pending_ignore_squeezables ();
 
   /* If forced to complete the update, or if no input is pending, do
      the update.  */
@@ -4149,7 +4149,7 @@ update_window (w, force_p)
               scrolling large windows with repeated scroll-up
               commands will too quickly pause redisplay.  */
            if (!force_p && ++n_updated % preempt_count == 0)
-             detect_input_pending ();
+             detect_input_pending_ignore_squeezables ();
 
            changed_p |= update_window_line (w, vpos,
                                             &mouse_face_overwritten_p);
@@ -5093,7 +5093,7 @@ update_frame_1 (f, force_p, inhibit_id_p)
 
   if (redisplay_dont_pause)
     force_p = 1;
-  else if (!force_p && detect_input_pending ())
+  else if (!force_p && detect_input_pending_ignore_squeezables ())
     {
       pause = 1;
       goto do_pause;
@@ -5149,7 +5149,7 @@ update_frame_1 (f, force_p, inhibit_id_p)
            }
 
          if ((i - 1) % preempt_count == 0)
-           detect_input_pending ();
+           detect_input_pending_ignore_squeezables ();
 
          update_frame_line (f, i);
        }
@@ -5842,7 +5842,7 @@ mode_line_string (w, part, x, y, charpos, object, dx, dy, width, height)
          it's the one we were looking for.  */
       glyph = row->glyphs[TEXT_AREA];
       end = glyph + row->used[TEXT_AREA];
-      for (x0 = *x; glyph < end && x0 > glyph->pixel_width; ++glyph)
+      for (x0 = *x; glyph < end && x0 >= glyph->pixel_width; ++glyph)
        x0 -= glyph->pixel_width;
       *x = glyph - row->glyphs[TEXT_AREA];
       if (glyph < end)
@@ -5934,7 +5934,7 @@ marginal_area_string (w, part, x, y, charpos, object, dx, dy, width, height)
 
       glyph = row->glyphs[area];
       end = glyph + row->used[area];
-      for (x0 = *x - x0; glyph < end && x0 > glyph->pixel_width; ++glyph)
+      for (x0 = *x - x0; glyph < end && x0 >= glyph->pixel_width; ++glyph)
        x0 -= glyph->pixel_width;
       *x = glyph - row->glyphs[area];
       if (glyph < end)
@@ -5994,6 +5994,9 @@ window_change_signal (signalnum) /* If we don't have an argument, */
 #endif
   int old_errno = errno;
 
+  signal (SIGWINCH, window_change_signal);
+  SIGNAL_THREAD_CHECK (signalnum);
+
   get_frame_size (&width, &height);
 
   /* The frame size change obviously applies to a termcap-controlled
@@ -6016,7 +6019,6 @@ window_change_signal (signalnum) /* If we don't have an argument, */
       }
   }
 
-  signal (SIGWINCH, window_change_signal);
   errno = old_errno;
 }
 #endif /* SIGWINCH */