emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/xterm.c


From: Kenichi Handa
Subject: [Emacs-diffs] Changes to emacs/src/xterm.c
Date: Fri, 26 Jul 2002 00:08:31 -0400

Index: emacs/src/xterm.c
diff -c emacs/src/xterm.c:1.746 emacs/src/xterm.c:1.747
*** emacs/src/xterm.c:1.746     Tue Jul 16 15:49:27 2002
--- emacs/src/xterm.c   Wed Jul 24 23:17:33 2002
***************
*** 485,490 ****
--- 485,492 ----
                                       XRectangle *));
  static void expose_frame P_ ((struct frame *, int, int, int, int));
  static int expose_window_tree P_ ((struct window *, XRectangle *));
+ static void expose_overlaps P_ ((struct window *, struct glyph_row *,
+                                struct glyph_row *));
  static int expose_window P_ ((struct window *, XRectangle *));
  static void expose_area P_ ((struct window *, struct glyph_row *,
                             XRectangle *, enum glyph_row_area));
***************
*** 6070,6075 ****
--- 6072,6110 ----
  }
  
  
+ /* Redraw those parts of glyphs rows during expose event handling that
+    overlap other rows.  Redrawing of an exposed line writes over parts
+    of lines overlapping that exposed line; this function fixes that.
+ 
+    W is the window being exposed.  FIRST_OVERLAPPING_ROW is the first
+    row in W's current matrix that is exposed and overlaps other rows.
+    LAST_OVERLAPPING_ROW is the last such row.  */
+ 
+ static void
+ expose_overlaps (w, first_overlapping_row, last_overlapping_row)
+      struct window *w;
+      struct glyph_row *first_overlapping_row;
+      struct glyph_row *last_overlapping_row;
+ {
+   struct glyph_row *row;
+   
+   for (row = first_overlapping_row; row <= last_overlapping_row; ++row)
+     if (row->overlapping_p)
+       {
+       xassert (row->enabled_p && !row->mode_line_p);
+         
+       if (row->used[LEFT_MARGIN_AREA])
+         x_fix_overlapping_area (w, row, LEFT_MARGIN_AREA);
+   
+       if (row->used[TEXT_AREA])
+         x_fix_overlapping_area (w, row, TEXT_AREA);
+   
+       if (row->used[RIGHT_MARGIN_AREA])
+         x_fix_overlapping_area (w, row, RIGHT_MARGIN_AREA);
+       }
+ }
+ 
+ 
  /* Redraw the part of window W intersection rectangle FR.  Pixel
     coordinates in FR are frame-relative.  Call this function with
     input blocked.  Value is non-zero if the exposure overwrites
***************
*** 6111,6116 ****
--- 6146,6152 ----
        int yb = window_text_bottom_y (w);
        struct glyph_row *row;
        int cursor_cleared_p;
+       struct glyph_row *first_overlapping_row, *last_overlapping_row;
    
        TRACE ((stderr, "expose_window (%d, %d, %d, %d)\n",
              r.x, r.y, r.width, r.height));
***************
*** 6129,6135 ****
        else
        cursor_cleared_p = 0;
  
!       /* Find the first row intersecting the rectangle R.  */
        for (row = w->current_matrix->rows;
           row->enabled_p;
           ++row)
--- 6165,6172 ----
        else
        cursor_cleared_p = 0;
  
!       /* Update lines intersecting rectangle R.  */
!       first_overlapping_row = last_overlapping_row = NULL;
        for (row = w->current_matrix->rows;
           row->enabled_p;
           ++row)
***************
*** 6142,6147 ****
--- 6179,6191 ----
              || (r.y >= y0 && r.y < y1)
              || (r.y + r.height > y0 && r.y + r.height < y1))
            {
+             if (row->overlapping_p)
+               {
+                 if (first_overlapping_row == NULL)
+                   first_overlapping_row = row;
+                 last_overlapping_row = row;
+               }
+             
              if (expose_line (w, row, &r))
                mouse_face_overwritten_p = 1;
            }
***************
*** 6162,6167 ****
--- 6206,6215 ----
  
        if (!w->pseudo_window_p)
        {
+         /* Fix the display of overlapping rows.  */
+         if (first_overlapping_row)
+           expose_overlaps (w, first_overlapping_row, last_overlapping_row);
+         
          /* Draw border between windows.  */
          x_draw_vertical_border (w);
        



reply via email to

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