Mercurial > emacs
changeset 43621:7755c5d1d8b4
(x_display_and_set_cursor): Blink box cursor using
hollow box cursor. Blink bar cursor using 1 pixel wide bar.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Fri, 01 Mar 2002 22:40:20 +0000 |
parents | 8a5d6239662c |
children | f2e1a89e08b3 |
files | src/w32term.c src/xterm.c |
diffstat | 2 files changed, 30 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/w32term.c Fri Mar 01 22:37:16 2002 +0000 +++ b/src/w32term.c Fri Mar 01 22:40:20 2002 +0000 @@ -9759,8 +9759,6 @@ else new_cursor_type = HOLLOW_BOX_CURSOR; } - else if (w->cursor_off_p) - new_cursor_type = NO_CURSOR; else { struct buffer *b = XBUFFER (w->buffer); @@ -9770,6 +9768,15 @@ else new_cursor_type = x_specified_cursor_type (b->cursor_type, &new_cursor_width); + if (w->cursor_off_p) + { + if (new_cursor_type == FILLED_BOX_CURSOR) + new_cursor_type = HOLLOW_BOX_CURSOR; + else if (new_cursor_type == BAR_CURSOR && new_cursor_width > 1) + new_cursor_width = 1; + else + new_cursor_type = NO_CURSOR; + } } } @@ -9780,7 +9787,9 @@ && (!on || w->phys_cursor.x != x || w->phys_cursor.y != y - || new_cursor_type != w->phys_cursor_type)) + || new_cursor_type != w->phys_cursor_type) + || (new_cursor_type == BAR_CURSOR + && new_cursor_width != w->phys_cursor_width))) x_erase_phys_cursor (w); /* If the cursor is now invisible and we want it to be visible, @@ -9805,9 +9814,13 @@ x_erase_phys_cursor (w); new_cursor_type = w->phys_cursor_type = NO_CURSOR; + w->phys_cursor_width = -1; } else - w->phys_cursor_type = new_cursor_type; + { + w->phys_cursor_type = new_cursor_type; + w->phys_cursor_width = new_cursor_width; + } w->phys_cursor_on_p = 1;
--- a/src/xterm.c Fri Mar 01 22:37:16 2002 +0000 +++ b/src/xterm.c Fri Mar 01 22:40:20 2002 +0000 @@ -11640,8 +11640,6 @@ else new_cursor_type = HOLLOW_BOX_CURSOR; } - else if (w->cursor_off_p) - new_cursor_type = NO_CURSOR; else { struct buffer *b = XBUFFER (w->buffer); @@ -11651,6 +11649,15 @@ else new_cursor_type = x_specified_cursor_type (b->cursor_type, &new_cursor_width); + if (w->cursor_off_p) + { + if (new_cursor_type == FILLED_BOX_CURSOR) + new_cursor_type = HOLLOW_BOX_CURSOR; + else if (new_cursor_type == BAR_CURSOR && new_cursor_width > 1) + new_cursor_width = 1; + else + new_cursor_type = NO_CURSOR; + } } } @@ -11661,7 +11668,9 @@ && (!on || w->phys_cursor.x != x || w->phys_cursor.y != y - || new_cursor_type != w->phys_cursor_type)) + || new_cursor_type != w->phys_cursor_type + || (new_cursor_type == BAR_CURSOR + && new_cursor_width != w->phys_cursor_width))) x_erase_phys_cursor (w); /* If the cursor is now invisible and we want it to be visible, @@ -11678,6 +11687,7 @@ w->phys_cursor.hpos = hpos; w->phys_cursor.vpos = vpos; w->phys_cursor_type = new_cursor_type; + w->phys_cursor_width = new_cursor_width; w->phys_cursor_on_p = 1; switch (new_cursor_type)