279 |
static void x_draw_bar_cursor P_ ((struct window *, struct glyph_row *, int, |
static void x_draw_bar_cursor P_ ((struct window *, struct glyph_row *, int, |
280 |
enum text_cursor_kinds)); |
enum text_cursor_kinds)); |
281 |
|
|
282 |
static void x_clip_to_row P_ ((struct window *, struct glyph_row *, GC)); |
static void x_clip_to_row P_ ((struct window *, struct glyph_row *, int, GC)); |
283 |
static void x_flush P_ ((struct frame *f)); |
static void x_flush P_ ((struct frame *f)); |
284 |
static void x_update_begin P_ ((struct frame *)); |
static void x_update_begin P_ ((struct frame *)); |
285 |
static void x_update_window_begin P_ ((struct window *)); |
static void x_update_window_begin P_ ((struct window *)); |
1454 |
int oldVH = row->visible_height; |
int oldVH = row->visible_height; |
1455 |
row->visible_height = p->h; |
row->visible_height = p->h; |
1456 |
row->y -= rowY - p->y; |
row->y -= rowY - p->y; |
1457 |
x_clip_to_row (w, row, gc); |
x_clip_to_row (w, row, -1, gc); |
1458 |
row->y = oldY; |
row->y = oldY; |
1459 |
row->visible_height = oldVH; |
row->visible_height = oldVH; |
1460 |
} |
} |
1461 |
else |
else |
1462 |
x_clip_to_row (w, row, gc); |
x_clip_to_row (w, row, -1, gc); |
1463 |
|
|
1464 |
if (p->bx >= 0 && !p->overlay_p) |
if (p->bx >= 0 && !p->overlay_p) |
1465 |
{ |
{ |
4615 |
mode lines must be clipped to the whole window. */ |
mode lines must be clipped to the whole window. */ |
4616 |
|
|
4617 |
static void |
static void |
4618 |
x_clip_to_row (w, row, gc) |
x_clip_to_row (w, row, area, gc) |
4619 |
struct window *w; |
struct window *w; |
4620 |
struct glyph_row *row; |
struct glyph_row *row; |
4621 |
|
int area; |
4622 |
GC gc; |
GC gc; |
4623 |
{ |
{ |
4624 |
struct frame *f = XFRAME (WINDOW_FRAME (w)); |
struct frame *f = XFRAME (WINDOW_FRAME (w)); |
4625 |
Rect clip_rect; |
Rect clip_rect; |
4626 |
int window_y, window_width; |
int window_x, window_y, window_width; |
4627 |
|
|
4628 |
window_box (w, -1, 0, &window_y, &window_width, 0); |
window_box (w, area, &window_x, &window_y, &window_width, 0); |
4629 |
|
|
4630 |
clip_rect.left = WINDOW_TO_FRAME_PIXEL_X (w, 0); |
clip_rect.left = window_x; |
4631 |
clip_rect.top = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); |
clip_rect.top = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); |
4632 |
clip_rect.top = max (clip_rect.top, window_y); |
clip_rect.top = max (clip_rect.top, window_y); |
4633 |
clip_rect.right = clip_rect.left + window_width; |
clip_rect.right = clip_rect.left + window_width; |
4693 |
gc = dpyinfo->scratch_cursor_gc; |
gc = dpyinfo->scratch_cursor_gc; |
4694 |
|
|
4695 |
/* Set clipping, draw the rectangle, and reset clipping again. */ |
/* Set clipping, draw the rectangle, and reset clipping again. */ |
4696 |
x_clip_to_row (w, row, gc); |
x_clip_to_row (w, row, TEXT_AREA, gc); |
4697 |
mac_draw_rectangle (dpy, FRAME_MAC_WINDOW (f), gc, x, y, wd, h); |
mac_draw_rectangle (dpy, FRAME_MAC_WINDOW (f), gc, x, y, wd, h); |
4698 |
mac_reset_clipping (dpy, FRAME_MAC_WINDOW (f)); |
mac_reset_clipping (dpy, FRAME_MAC_WINDOW (f)); |
4699 |
} |
} |
4764 |
width = min (cursor_glyph->pixel_width, width); |
width = min (cursor_glyph->pixel_width, width); |
4765 |
|
|
4766 |
w->phys_cursor_width = width; |
w->phys_cursor_width = width; |
4767 |
x_clip_to_row (w, row, gc); |
x_clip_to_row (w, row, TEXT_AREA, gc); |
4768 |
|
|
4769 |
if (kind == BAR_CURSOR) |
if (kind == BAR_CURSOR) |
4770 |
XFillRectangle (dpy, window, gc, |
XFillRectangle (dpy, window, gc, |