aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2002-05-28 20:28:12 +0000
committerRichard M. Stallman2002-05-28 20:28:12 +0000
commitf7e039de270fcf2c788d4f938060600db34b78f3 (patch)
tree6baba8d26215de06280ef2ef4a235882d0a13c09 /src
parentdad67609c8173919fc1e5b7b5fca3a89e8b65091 (diff)
downloademacs-f7e039de270fcf2c788d4f938060600db34b78f3.tar.gz
emacs-f7e039de270fcf2c788d4f938060600db34b78f3.zip
(x_display_and_set_cursor): Change the cursor in the same
way for blinked-off state and for a nonselected window.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog13
-rw-r--r--src/xterm.c74
2 files changed, 55 insertions, 32 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c77814bb4e8..6cb066ecea6 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,16 @@
12002-05-28 Richard M. Stallman <rms@gnu.org>
2
3 * xterm.c (x_display_and_set_cursor): Change the cursor in the same
4 way for blinked-off state and for a nonselected window.
5
6 * window.c (window_scroll_pixel_based): Don't call Fbolp;
7 instead, see if the new start pos is at beginning of line.
8
9 * fileio.c (Fwrite_region): If START is a string, don't
10 make any annotations.
11
12 * eval.c (syms_of_eval): Doc fix.
13
12002-05-28 Colin Walters <walters@debian.org> 142002-05-28 Colin Walters <walters@debian.org>
2 15
3 * emacs.c (USAGE1): Add --no-splash. 16 * emacs.c (USAGE1): Add --no-splash.
diff --git a/src/xterm.c b/src/xterm.c
index c98d278c771..77961b43229 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -11649,6 +11649,7 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
11649 struct frame *f = XFRAME (w->frame); 11649 struct frame *f = XFRAME (w->frame);
11650 int new_cursor_type; 11650 int new_cursor_type;
11651 int new_cursor_width; 11651 int new_cursor_width;
11652 int cursor_off_state = 0;
11652 struct glyph_matrix *current_glyphs; 11653 struct glyph_matrix *current_glyphs;
11653 struct glyph_row *glyph_row; 11654 struct glyph_row *glyph_row;
11654 struct glyph *glyph; 11655 struct glyph *glyph;
@@ -11688,52 +11689,61 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
11688 marked off, draw no cursor. In all other cases, we want a hollow 11689 marked off, draw no cursor. In all other cases, we want a hollow
11689 box cursor. */ 11690 box cursor. */
11690 new_cursor_width = -1; 11691 new_cursor_width = -1;
11692 new_cursor_type = -2;
11693
11694 /* Echo area */
11691 if (cursor_in_echo_area 11695 if (cursor_in_echo_area
11692 && FRAME_HAS_MINIBUF_P (f) 11696 && FRAME_HAS_MINIBUF_P (f)
11693 && EQ (FRAME_MINIBUF_WINDOW (f), echo_area_window)) 11697 && EQ (FRAME_MINIBUF_WINDOW (f), echo_area_window))
11694 { 11698 {
11695 if (w == XWINDOW (echo_area_window)) 11699 if (w == XWINDOW (echo_area_window))
11696 new_cursor_type = FRAME_DESIRED_CURSOR (f); 11700 new_cursor_type = FRAME_DESIRED_CURSOR (f);
11697 else if (!NILP (Fbuffer_local_value (Qcursor_in_non_selected_windows, 11701 else if (NILP (Fbuffer_local_value (Qcursor_in_non_selected_windows,
11698 w->buffer))) 11702 w->buffer)))
11699 new_cursor_type = HOLLOW_BOX_CURSOR; 11703 new_cursor_type = NO_CURSOR;
11700 else 11704 else
11705 cursor_off_state = 1;
11706 }
11707
11708 /* Nonselected window or nonselected frame. */
11709 else if (f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame
11710 || w != XWINDOW (f->selected_window))
11711 {
11712 if ((MINI_WINDOW_P (w) && minibuf_level == 0)
11713 || NILP (Fbuffer_local_value (Qcursor_in_non_selected_windows,
11714 w->buffer))
11715 || NILP (XBUFFER (w->buffer)->cursor_type))
11701 new_cursor_type = NO_CURSOR; 11716 new_cursor_type = NO_CURSOR;
11717 else
11718 cursor_off_state = 1;
11702 } 11719 }
11703 else 11720
11721 /* If new_cursor_type isn't decided yet, decide it now. */
11722 if (new_cursor_type == -2)
11704 { 11723 {
11705 if (f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame 11724 struct buffer *b = XBUFFER (w->buffer);
11706 || w != XWINDOW (f->selected_window)) 11725
11707 { 11726 if (EQ (b->cursor_type, Qt))
11708 if ((MINI_WINDOW_P (w) && minibuf_level == 0) 11727 new_cursor_type = FRAME_DESIRED_CURSOR (f);
11709 || NILP (Fbuffer_local_value (Qcursor_in_non_selected_windows,
11710 w->buffer))
11711 || NILP (XBUFFER (w->buffer)->cursor_type))
11712 new_cursor_type = NO_CURSOR;
11713 else
11714 new_cursor_type = HOLLOW_BOX_CURSOR;
11715 }
11716 else 11728 else
11717 { 11729 new_cursor_type = x_specified_cursor_type (b->cursor_type,
11718 struct buffer *b = XBUFFER (w->buffer); 11730 &new_cursor_width);
11731 }
11719 11732
11720 if (EQ (b->cursor_type, Qt)) 11733 /* Dim out or hollow out the cursor,
11721 new_cursor_type = FRAME_DESIRED_CURSOR (f); 11734 if it has blinked off or for nonselected windows. */
11722 else 11735 if (w->cursor_off_p || cursor_off_state)
11723 new_cursor_type = x_specified_cursor_type (b->cursor_type, 11736 {
11724 &new_cursor_width); 11737 if (new_cursor_type == FILLED_BOX_CURSOR)
11725 if (w->cursor_off_p) 11738 new_cursor_type = HOLLOW_BOX_CURSOR;
11726 { 11739 else if (new_cursor_type == BAR_CURSOR && new_cursor_width > 1)
11727 if (new_cursor_type == FILLED_BOX_CURSOR) 11740 new_cursor_width = 1;
11728 new_cursor_type = HOLLOW_BOX_CURSOR; 11741 else
11729 else if (new_cursor_type == BAR_CURSOR && new_cursor_width > 1) 11742 new_cursor_type = NO_CURSOR;
11730 new_cursor_width = 1;
11731 else
11732 new_cursor_type = NO_CURSOR;
11733 }
11734 }
11735 } 11743 }
11736 11744
11745 /* Now new_cursor_type is correct. */
11746
11737 /* If cursor is currently being shown and we don't want it to be or 11747 /* If cursor is currently being shown and we don't want it to be or
11738 it is in the wrong place, or the cursor type is not what we want, 11748 it is in the wrong place, or the cursor type is not what we want,
11739 erase it. */ 11749 erase it. */