/[emacs]/emacs/src/macterm.c
ViewVC logotype

Diff of /emacs/src/macterm.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18 by kfstorm, Fri Aug 30 12:02:10 2002 UTC revision 1.19 by akochoi, Sat Aug 31 00:53:12 2002 UTC
# Line 443  static void x_draw_bar_cursor P_ ((struc Line 443  static void x_draw_bar_cursor P_ ((struc
443  static int x_intersect_rectangles P_ ((Rect *, Rect *, Rect *));  static int x_intersect_rectangles P_ ((Rect *, Rect *, Rect *));
444  static void expose_frame P_ ((struct frame *, int, int, int, int));  static void expose_frame P_ ((struct frame *, int, int, int, int));
445  static int expose_window_tree P_ ((struct window *, Rect *));  static int expose_window_tree P_ ((struct window *, Rect *));
446    static void expose_overlaps P_ ((struct window *, struct glyph_row *,
447                                     struct glyph_row *));
448  static int expose_window P_ ((struct window *, Rect *));  static int expose_window P_ ((struct window *, Rect *));
449  static void expose_area P_ ((struct window *, struct glyph_row *,  static void expose_area P_ ((struct window *, struct glyph_row *,
450                               Rect *, enum glyph_row_area));                               Rect *, enum glyph_row_area));
# Line 6240  x_phys_cursor_in_rect_p (w, r) Line 6242  x_phys_cursor_in_rect_p (w, r)
6242  }  }
6243    
6244    
6245  /* Redraw the part of window W intersection rectagle FR.  Pixel  /* Redraw those parts of glyphs rows during expose event handling that
6246     coordinates in FR are frame relative.  Call this function with     overlap other rows.  Redrawing of an exposed line writes over parts
6247       of lines overlapping that exposed line; this function fixes that.
6248    
6249       W is the window being exposed.  FIRST_OVERLAPPING_ROW is the first
6250       row in W's current matrix that is exposed and overlaps other rows.
6251       LAST_OVERLAPPING_ROW is the last such row.  */
6252    
6253    static void
6254    expose_overlaps (w, first_overlapping_row, last_overlapping_row)
6255         struct window *w;
6256         struct glyph_row *first_overlapping_row;
6257         struct glyph_row *last_overlapping_row;
6258    {
6259      struct glyph_row *row;
6260      
6261      for (row = first_overlapping_row; row <= last_overlapping_row; ++row)
6262        if (row->overlapping_p)
6263          {
6264            xassert (row->enabled_p && !row->mode_line_p);
6265              
6266            if (row->used[LEFT_MARGIN_AREA])
6267              x_fix_overlapping_area (w, row, LEFT_MARGIN_AREA);
6268      
6269            if (row->used[TEXT_AREA])
6270              x_fix_overlapping_area (w, row, TEXT_AREA);
6271      
6272            if (row->used[RIGHT_MARGIN_AREA])
6273              x_fix_overlapping_area (w, row, RIGHT_MARGIN_AREA);
6274          }
6275    }
6276    
6277    
6278    /* Redraw the part of window W intersection rectangle FR.  Pixel
6279       coordinates in FR are frame-relative.  Call this function with
6280     input blocked.  Value is non-zero if the exposure overwrites     input blocked.  Value is non-zero if the exposure overwrites
6281     mouse-face.  */     mouse-face.  */
6282    
# Line 6281  expose_window (w, fr) Line 6316  expose_window (w, fr)
6316        int yb = window_text_bottom_y (w);        int yb = window_text_bottom_y (w);
6317        struct glyph_row *row;        struct glyph_row *row;
6318        int cursor_cleared_p;        int cursor_cleared_p;
6319          struct glyph_row *first_overlapping_row, *last_overlapping_row;
6320      
6321        TRACE ((stderr, "expose_window (%d, %d, %d, %d)\n",        TRACE ((stderr, "expose_window (%d, %d, %d, %d)\n",
6322                r.left, r.top, r.right, r.bottom));                r.left, r.top, r.right, r.bottom));
6323    
# Line 6301  expose_window (w, fr) Line 6337  expose_window (w, fr)
6337        else        else
6338          cursor_cleared_p = 0;          cursor_cleared_p = 0;
6339    
6340        /* Find the first row intersecting the rectangle R.  */        /* Update lines intersecting rectangle R.  */
6341          first_overlapping_row = last_overlapping_row = NULL;
6342        for (row = w->current_matrix->rows;        for (row = w->current_matrix->rows;
6343             row->enabled_p;             row->enabled_p;
6344             ++row)             ++row)
# Line 6314  expose_window (w, fr) Line 6351  expose_window (w, fr)
6351                || (r.top >= y0 && r.top < y1)                || (r.top >= y0 && r.top < y1)
6352                || (r.bottom > y0 && r.bottom < y1))                || (r.bottom > y0 && r.bottom < y1))
6353              {              {
6354                  if (row->overlapping_p)
6355                    {
6356                      if (first_overlapping_row == NULL)
6357                        first_overlapping_row = row;
6358                      last_overlapping_row = row;
6359                    }
6360                  
6361                if (expose_line (w, row, &r))                if (expose_line (w, row, &r))
6362                  mouse_face_overwritten_p = 1;                  mouse_face_overwritten_p = 1;
6363              }              }
6364                  
6365            if (y1 >= yb)            if (y1 >= yb)
6366              break;              break;
6367          }          }
# Line 6334  expose_window (w, fr) Line 6378  expose_window (w, fr)
6378    
6379        if (!w->pseudo_window_p)        if (!w->pseudo_window_p)
6380          {          {
6381              /* Fix the display of overlapping rows.  */
6382              if (first_overlapping_row)
6383                expose_overlaps (w, first_overlapping_row, last_overlapping_row);
6384              
6385            /* Draw border between windows.  */            /* Draw border between windows.  */
6386            x_draw_vertical_border (w);            x_draw_vertical_border (w);
6387          
6388            /* Turn the cursor on again.  */            /* Turn the cursor on again.  */
6389            if (cursor_cleared_p)            if (cursor_cleared_p)
6390              x_update_window_cursor (w, 1);              x_update_window_cursor (w, 1);

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26