struct frame *f = XFRAME (w->frame);
int new_cursor_type;
int new_cursor_width;
+ int active_cursor;
struct glyph_matrix *current_glyphs;
struct glyph_row *glyph_row;
struct glyph *glyph;
xassert (interrupt_input_blocked);
/* Set new_cursor_type to the cursor we want to be displayed. */
- new_cursor_type = get_window_cursor_type (w, &new_cursor_width);
+ new_cursor_type = get_window_cursor_type (w, &new_cursor_width, &active_cursor);
/* If cursor is currently being shown and we don't want it to be or
}
-/* Return the cursor we want to be displayed. In a mini-buffer
- window, we want the cursor only to appear if we are reading input
- from this window. For the selected window, we want the cursor type
- given by the frame parameter or buffer local setting of
- cursor-type. If explicitly marked off, draw no cursor. In all
- other cases, we want a hollow box cursor. */
+/* Return the cursor we want to be displayed in window W. Return
+ width of bar/hbar cursor through WIDTH arg. Return with
+ ACTIVE_CURSOR arg set to 1 if cursor in window W is `active'
+ (i.e. if the `system caret' should track this cursor).
+
+ In a mini-buffer window, we want the cursor only to appear if we
+ are reading input from this window. For the selected window, we
+ want the cursor type given by the frame parameter or buffer local
+ setting of cursor-type. If explicitly marked off, draw no cursor.
+ In all other cases, we want a hollow box cursor. */
enum text_cursor_kinds
-get_window_cursor_type (w, width)
+get_window_cursor_type (w, width, active_cursor)
struct window *w;
int *width;
+ int *active_cursor;
{
struct frame *f = XFRAME (w->frame);
struct buffer *b = XBUFFER (w->buffer);
Lisp_Object alt_cursor;
int non_selected = 0;
+ *active_cursor = 1;
+
/* Echo area */
if (cursor_in_echo_area
&& FRAME_HAS_MINIBUF_P (f)
return FRAME_DESIRED_CURSOR (f);
}
+ *active_cursor = 0;
non_selected = 1;
}
#endif
)
{
+ *active_cursor = 0;
+
if (MINI_WINDOW_P (w) && minibuf_level == 0)
return NO_CURSOR;
struct frame *f = XFRAME (w->frame);
int new_cursor_type;
int new_cursor_width;
+ int active_cursor;
struct glyph_matrix *current_glyphs;
struct glyph_row *glyph_row;
struct glyph *glyph;
xassert (interrupt_input_blocked);
/* Set new_cursor_type to the cursor we want to be displayed. */
- new_cursor_type = get_window_cursor_type (w, &new_cursor_width);
+ new_cursor_type = get_window_cursor_type (w, &new_cursor_width, &active_cursor);
/* If cursor is currently being shown and we don't want it to be or
it is in the wrong place, or the cursor type is not what we want,