Mercurial > emacs
comparison src/w32term.c @ 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 | 6b55f979d4ed |
children | 2d2700949b8c |
comparison
equal
deleted
inserted
replaced
43620:8a5d6239662c | 43621:7755c5d1d8b4 |
---|---|
9757 || NILP (XBUFFER (w->buffer)->cursor_type)) | 9757 || NILP (XBUFFER (w->buffer)->cursor_type)) |
9758 new_cursor_type = NO_CURSOR; | 9758 new_cursor_type = NO_CURSOR; |
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); |
9767 | 9765 |
9768 if (EQ (b->cursor_type, Qt)) | 9766 if (EQ (b->cursor_type, Qt)) |
9769 new_cursor_type = FRAME_DESIRED_CURSOR (f); | 9767 new_cursor_type = FRAME_DESIRED_CURSOR (f); |
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 |
9776 /* If cursor is currently being shown and we don't want it to be or | 9783 /* If cursor is currently being shown and we don't want it to be or |
9777 it is in the wrong place, or the cursor type is not what we want, | 9784 it is in the wrong place, or the cursor type is not what we want, |
9778 erase it. */ | 9785 erase it. */ |
9779 if (w->phys_cursor_on_p | 9786 if (w->phys_cursor_on_p |
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, |
9787 display it. */ | 9796 display it. */ |
9788 if (on && !w->phys_cursor_on_p) | 9797 if (on && !w->phys_cursor_on_p) |
9803 { | 9812 { |
9804 if (w->phys_cursor_type != NO_CURSOR) | 9813 if (w->phys_cursor_type != NO_CURSOR) |
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 |
9814 /* If this is the active cursor, we need to track it with the | 9827 /* If this is the active cursor, we need to track it with the |
9815 system caret, so third party software like screen magnifiers | 9828 system caret, so third party software like screen magnifiers |