diff options
| author | Dmitry Antipov | 2013-08-28 09:45:38 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-08-28 09:45:38 +0400 |
| commit | f60e429a1a1a0d6a51761ef12e54dde52967f085 (patch) | |
| tree | 83be6ff103b71cb7b59fa171b631437f0c6720c7 /src/xterm.c | |
| parent | 0acfedd3496a4a375c27215d13bf63466fdb1071 (diff) | |
| download | emacs-f60e429a1a1a0d6a51761ef12e54dde52967f085.tar.gz emacs-f60e429a1a1a0d6a51761ef12e54dde52967f085.zip | |
Redesign redisplay interface to drop global output_cursor.
* dispextern.h (struct redisplay_interface): Remove cursor_to member.
(toplevel): Remove declaration of output_cursor.
(set_output_cursor, x_cursor_to): Remove prototype.
* window.h (struct window): New member output_cursor.
(output_cursor_to): New function to replace RIF member.
* dispnew.c (redraw_overlapped_rows, update_marginal_area)
(update_text_area, set_window_cursor_after_update): Use it.
* xdisp.c (output_cursor, set_output_cursor, x_cursor_to): Remove.
(x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
* nsterm.m (ns_update_window_begin, ns_update_window_end):
* w32term.c (x_update_window_begin, x_update_window_end):
* xterm.c (x_update_window_begin, x_update_window_end):
Adjust to use per-window output cursor.
Diffstat (limited to 'src/xterm.c')
| -rw-r--r-- | src/xterm.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/xterm.c b/src/xterm.c index 777f13e431c..b7a98dbc5c1 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -551,8 +551,7 @@ x_update_begin (struct frame *f) | |||
| 551 | } | 551 | } |
| 552 | 552 | ||
| 553 | 553 | ||
| 554 | /* Start update of window W. Set output_cursor to the cursor | 554 | /* Start update of window W. */ |
| 555 | position of W. */ | ||
| 556 | 555 | ||
| 557 | static void | 556 | static void |
| 558 | x_update_window_begin (struct window *w) | 557 | x_update_window_begin (struct window *w) |
| @@ -560,7 +559,7 @@ x_update_window_begin (struct window *w) | |||
| 560 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 559 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 561 | Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); | 560 | Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); |
| 562 | 561 | ||
| 563 | set_output_cursor (&w->cursor); | 562 | w->output_cursor = w->cursor; |
| 564 | 563 | ||
| 565 | block_input (); | 564 | block_input (); |
| 566 | 565 | ||
| @@ -618,9 +617,9 @@ x_update_window_end (struct window *w, bool cursor_on_p, | |||
| 618 | block_input (); | 617 | block_input (); |
| 619 | 618 | ||
| 620 | if (cursor_on_p) | 619 | if (cursor_on_p) |
| 621 | display_and_set_cursor (w, 1, output_cursor.hpos, | 620 | display_and_set_cursor (w, 1, |
| 622 | output_cursor.vpos, | 621 | w->output_cursor.hpos, w->output_cursor.vpos, |
| 623 | output_cursor.x, output_cursor.y); | 622 | w->output_cursor.x, w->output_cursor.y); |
| 624 | 623 | ||
| 625 | if (draw_window_fringes (w, 1)) | 624 | if (draw_window_fringes (w, 1)) |
| 626 | x_draw_vertical_border (w); | 625 | x_draw_vertical_border (w); |
| @@ -2983,11 +2982,7 @@ x_clear_frame (struct frame *f) | |||
| 2983 | /* Clearing the frame will erase any cursor, so mark them all as no | 2982 | /* Clearing the frame will erase any cursor, so mark them all as no |
| 2984 | longer visible. */ | 2983 | longer visible. */ |
| 2985 | mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f))); | 2984 | mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f))); |
| 2986 | output_cursor.hpos = output_cursor.vpos = 0; | ||
| 2987 | output_cursor.x = -1; | ||
| 2988 | 2985 | ||
| 2989 | /* We don't set the output cursor here because there will always | ||
| 2990 | follow an explicit cursor_to. */ | ||
| 2991 | block_input (); | 2986 | block_input (); |
| 2992 | 2987 | ||
| 2993 | XClearWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)); | 2988 | XClearWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)); |
| @@ -10448,7 +10443,6 @@ static struct redisplay_interface x_redisplay_interface = | |||
| 10448 | x_after_update_window_line, | 10443 | x_after_update_window_line, |
| 10449 | x_update_window_begin, | 10444 | x_update_window_begin, |
| 10450 | x_update_window_end, | 10445 | x_update_window_end, |
| 10451 | x_cursor_to, | ||
| 10452 | x_flush, | 10446 | x_flush, |
| 10453 | #ifdef XFlush | 10447 | #ifdef XFlush |
| 10454 | x_flush, | 10448 | x_flush, |