aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2002-03-01 22:40:20 +0000
committerKim F. Storm2002-03-01 22:40:20 +0000
commite1429afe8b205c8cec466d7f439b2f14bc92736e (patch)
tree7d5b9423cf20cea7136611ec9bf8c604c1d71ee3
parent4b26579e726a24f39d8d7a861bb21c4ad44a17f1 (diff)
downloademacs-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.
-rw-r--r--src/w32term.c21
-rw-r--r--src/xterm.c16
2 files changed, 30 insertions, 7 deletions
diff --git a/src/w32term.c b/src/w32term.c
index 777ebd270e6..d4a071e30a0 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -9759,8 +9759,6 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
9759 else 9759 else
9760 new_cursor_type = HOLLOW_BOX_CURSOR; 9760 new_cursor_type = HOLLOW_BOX_CURSOR;
9761 } 9761 }
9762 else if (w->cursor_off_p)
9763 new_cursor_type = NO_CURSOR;
9764 else 9762 else
9765 { 9763 {
9766 struct buffer *b = XBUFFER (w->buffer); 9764 struct buffer *b = XBUFFER (w->buffer);
@@ -9770,6 +9768,15 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
9770 else 9768 else
9771 new_cursor_type = x_specified_cursor_type (b->cursor_type, 9769 new_cursor_type = x_specified_cursor_type (b->cursor_type,
9772 &new_cursor_width); 9770 &new_cursor_width);
9771 if (w->cursor_off_p)
9772 {
9773 if (new_cursor_type == FILLED_BOX_CURSOR)
9774 new_cursor_type = HOLLOW_BOX_CURSOR;
9775 else if (new_cursor_type == BAR_CURSOR && new_cursor_width > 1)
9776 new_cursor_width = 1;
9777 else
9778 new_cursor_type = NO_CURSOR;
9779 }
9773 } 9780 }
9774 } 9781 }
9775 9782
@@ -9780,7 +9787,9 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
9780 && (!on 9787 && (!on
9781 || w->phys_cursor.x != x 9788 || w->phys_cursor.x != x
9782 || w->phys_cursor.y != y 9789 || w->phys_cursor.y != y
9783 || new_cursor_type != w->phys_cursor_type)) 9790 || new_cursor_type != w->phys_cursor_type)
9791 || (new_cursor_type == BAR_CURSOR
9792 && new_cursor_width != w->phys_cursor_width)))
9784 x_erase_phys_cursor (w); 9793 x_erase_phys_cursor (w);
9785 9794
9786 /* If the cursor is now invisible and we want it to be visible, 9795 /* If the cursor is now invisible and we want it to be visible,
@@ -9805,9 +9814,13 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
9805 x_erase_phys_cursor (w); 9814 x_erase_phys_cursor (w);
9806 9815
9807 new_cursor_type = w->phys_cursor_type = NO_CURSOR; 9816 new_cursor_type = w->phys_cursor_type = NO_CURSOR;
9817 w->phys_cursor_width = -1;
9808 } 9818 }
9809 else 9819 else
9810 w->phys_cursor_type = new_cursor_type; 9820 {
9821 w->phys_cursor_type = new_cursor_type;
9822 w->phys_cursor_width = new_cursor_width;
9823 }
9811 9824
9812 w->phys_cursor_on_p = 1; 9825 w->phys_cursor_on_p = 1;
9813 9826
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)