Commit e9c99027 authored by Kim F. Storm's avatar Kim F. Storm
Browse files

(get_window_cursor_type): New arg ACTIVE_CURSOR.

Callers changed (supply dummy arg).
parent 1cdf2e12
......@@ -9298,6 +9298,7 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
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;
......@@ -9331,7 +9332,7 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
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
......
......@@ -15288,17 +15288,22 @@ set_frame_cursor_types (f, arg)
}
/* 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);
......@@ -15306,6 +15311,8 @@ get_window_cursor_type (w, width)
Lisp_Object alt_cursor;
int non_selected = 0;
*active_cursor = 1;
/* Echo area */
if (cursor_in_echo_area
&& FRAME_HAS_MINIBUF_P (f)
......@@ -15317,6 +15324,7 @@ get_window_cursor_type (w, width)
return FRAME_DESIRED_CURSOR (f);
}
*active_cursor = 0;
non_selected = 1;
}
......@@ -15327,6 +15335,8 @@ get_window_cursor_type (w, width)
#endif
)
{
*active_cursor = 0;
if (MINI_WINDOW_P (w) && minibuf_level == 0)
return NO_CURSOR;
......
......@@ -11802,6 +11802,7 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
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;
......@@ -11835,7 +11836,7 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment