diff options
| author | Kim F. Storm | 2002-03-01 22:40:20 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2002-03-01 22:40:20 +0000 |
| commit | e1429afe8b205c8cec466d7f439b2f14bc92736e (patch) | |
| tree | 7d5b9423cf20cea7136611ec9bf8c604c1d71ee3 /src/xterm.c | |
| parent | 4b26579e726a24f39d8d7a861bb21c4ad44a17f1 (diff) | |
| download | emacs-e1429afe8b205c8cec466d7f439b2f14bc92736e.tar.gz emacs-e1429afe8b205c8cec466d7f439b2f14bc92736e.zip | |
(x_display_and_set_cursor): Blink box cursor using
hollow box cursor. Blink bar cursor using 1 pixel wide bar.
Diffstat (limited to 'src/xterm.c')
| -rw-r--r-- | src/xterm.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/xterm.c b/src/xterm.c index 82f98d9b7e4..a6a4e21a531 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -11640,8 +11640,6 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y) | |||
| 11640 | else | 11640 | else |
| 11641 | new_cursor_type = HOLLOW_BOX_CURSOR; | 11641 | new_cursor_type = HOLLOW_BOX_CURSOR; |
| 11642 | } | 11642 | } |
| 11643 | else if (w->cursor_off_p) | ||
| 11644 | new_cursor_type = NO_CURSOR; | ||
| 11645 | else | 11643 | else |
| 11646 | { | 11644 | { |
| 11647 | struct buffer *b = XBUFFER (w->buffer); | 11645 | struct buffer *b = XBUFFER (w->buffer); |
| @@ -11651,6 +11649,15 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y) | |||
| 11651 | else | 11649 | else |
| 11652 | new_cursor_type = x_specified_cursor_type (b->cursor_type, | 11650 | new_cursor_type = x_specified_cursor_type (b->cursor_type, |
| 11653 | &new_cursor_width); | 11651 | &new_cursor_width); |
| 11652 | if (w->cursor_off_p) | ||
| 11653 | { | ||
| 11654 | if (new_cursor_type == FILLED_BOX_CURSOR) | ||
| 11655 | new_cursor_type = HOLLOW_BOX_CURSOR; | ||
| 11656 | else if (new_cursor_type == BAR_CURSOR && new_cursor_width > 1) | ||
| 11657 | new_cursor_width = 1; | ||
| 11658 | else | ||
| 11659 | new_cursor_type = NO_CURSOR; | ||
| 11660 | } | ||
| 11654 | } | 11661 | } |
| 11655 | } | 11662 | } |
| 11656 | 11663 | ||
| @@ -11661,7 +11668,9 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y) | |||
| 11661 | && (!on | 11668 | && (!on |
| 11662 | || w->phys_cursor.x != x | 11669 | || w->phys_cursor.x != x |
| 11663 | || w->phys_cursor.y != y | 11670 | || w->phys_cursor.y != y |
| 11664 | || new_cursor_type != w->phys_cursor_type)) | 11671 | || new_cursor_type != w->phys_cursor_type |
| 11672 | || (new_cursor_type == BAR_CURSOR | ||
| 11673 | && new_cursor_width != w->phys_cursor_width))) | ||
| 11665 | x_erase_phys_cursor (w); | 11674 | x_erase_phys_cursor (w); |
| 11666 | 11675 | ||
| 11667 | /* If the cursor is now invisible and we want it to be visible, | 11676 | /* If the cursor is now invisible and we want it to be visible, |
| @@ -11678,6 +11687,7 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y) | |||
| 11678 | w->phys_cursor.hpos = hpos; | 11687 | w->phys_cursor.hpos = hpos; |
| 11679 | w->phys_cursor.vpos = vpos; | 11688 | w->phys_cursor.vpos = vpos; |
| 11680 | w->phys_cursor_type = new_cursor_type; | 11689 | w->phys_cursor_type = new_cursor_type; |
| 11690 | w->phys_cursor_width = new_cursor_width; | ||
| 11681 | w->phys_cursor_on_p = 1; | 11691 | w->phys_cursor_on_p = 1; |
| 11682 | 11692 | ||
| 11683 | switch (new_cursor_type) | 11693 | switch (new_cursor_type) |