15288 |
} |
} |
15289 |
|
|
15290 |
|
|
15291 |
/* Return the cursor we want to be displayed. In a mini-buffer |
/* Return the cursor we want to be displayed in window W. Return |
15292 |
window, we want the cursor only to appear if we are reading input |
width of bar/hbar cursor through WIDTH arg. Return with |
15293 |
from this window. For the selected window, we want the cursor type |
ACTIVE_CURSOR arg set to 1 if cursor in window W is `active' |
15294 |
given by the frame parameter or buffer local setting of |
(i.e. if the `system caret' should track this cursor). |
15295 |
cursor-type. If explicitly marked off, draw no cursor. In all |
|
15296 |
other cases, we want a hollow box cursor. */ |
In a mini-buffer window, we want the cursor only to appear if we |
15297 |
|
are reading input from this window. For the selected window, we |
15298 |
|
want the cursor type given by the frame parameter or buffer local |
15299 |
|
setting of cursor-type. If explicitly marked off, draw no cursor. |
15300 |
|
In all other cases, we want a hollow box cursor. */ |
15301 |
|
|
15302 |
enum text_cursor_kinds |
enum text_cursor_kinds |
15303 |
get_window_cursor_type (w, width) |
get_window_cursor_type (w, width, active_cursor) |
15304 |
struct window *w; |
struct window *w; |
15305 |
int *width; |
int *width; |
15306 |
|
int *active_cursor; |
15307 |
{ |
{ |
15308 |
struct frame *f = XFRAME (w->frame); |
struct frame *f = XFRAME (w->frame); |
15309 |
struct buffer *b = XBUFFER (w->buffer); |
struct buffer *b = XBUFFER (w->buffer); |
15311 |
Lisp_Object alt_cursor; |
Lisp_Object alt_cursor; |
15312 |
int non_selected = 0; |
int non_selected = 0; |
15313 |
|
|
15314 |
|
*active_cursor = 1; |
15315 |
|
|
15316 |
/* Echo area */ |
/* Echo area */ |
15317 |
if (cursor_in_echo_area |
if (cursor_in_echo_area |
15318 |
&& FRAME_HAS_MINIBUF_P (f) |
&& FRAME_HAS_MINIBUF_P (f) |
15324 |
return FRAME_DESIRED_CURSOR (f); |
return FRAME_DESIRED_CURSOR (f); |
15325 |
} |
} |
15326 |
|
|
15327 |
|
*active_cursor = 0; |
15328 |
non_selected = 1; |
non_selected = 1; |
15329 |
} |
} |
15330 |
|
|
15335 |
#endif |
#endif |
15336 |
) |
) |
15337 |
{ |
{ |
15338 |
|
*active_cursor = 0; |
15339 |
|
|
15340 |
if (MINI_WINDOW_P (w) && minibuf_level == 0) |
if (MINI_WINDOW_P (w) && minibuf_level == 0) |
15341 |
return NO_CURSOR; |
return NO_CURSOR; |
15342 |
|
|