diff options
| author | Richard M. Stallman | 2001-11-05 00:14:31 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2001-11-05 00:14:31 +0000 |
| commit | 34368a22c54c089f5ebabb7f0625862d6b8008f8 (patch) | |
| tree | 174a5a0c60b123abc90d859d115a3a79c41b4017 /src | |
| parent | 88d778acfc1f2f82296cf86986183722f1907084 (diff) | |
| download | emacs-34368a22c54c089f5ebabb7f0625862d6b8008f8.tar.gz emacs-34368a22c54c089f5ebabb7f0625862d6b8008f8.zip | |
(x_display_and_set_cursor): Use buffer-local
value of `cursor-in-non-selected-windows'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32term.c | 7 | ||||
| -rw-r--r-- | src/xterm.c | 10 |
2 files changed, 11 insertions, 6 deletions
diff --git a/src/w32term.c b/src/w32term.c index 41c2a759cb4..b9d1a1e9317 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -9492,6 +9492,7 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y) | |||
| 9492 | struct glyph_matrix *current_glyphs; | 9492 | struct glyph_matrix *current_glyphs; |
| 9493 | struct glyph_row *glyph_row; | 9493 | struct glyph_row *glyph_row; |
| 9494 | struct glyph *glyph; | 9494 | struct glyph *glyph; |
| 9495 | int cursor_non_selected; | ||
| 9495 | int active_cursor = 1; | 9496 | int active_cursor = 1; |
| 9496 | 9497 | ||
| 9497 | /* This is pointless on invisible frames, and dangerous on garbaged | 9498 | /* This is pointless on invisible frames, and dangerous on garbaged |
| @@ -9528,6 +9529,9 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y) | |||
| 9528 | the cursor type given by the frame parameter. If explicitly | 9529 | the cursor type given by the frame parameter. If explicitly |
| 9529 | marked off, draw no cursor. In all other cases, we want a hollow | 9530 | marked off, draw no cursor. In all other cases, we want a hollow |
| 9530 | box cursor. */ | 9531 | box cursor. */ |
| 9532 | cursor_non_selected | ||
| 9533 | = !NILP (Fbuffer_local_value (Qcursor_in_non_selected_windows | ||
| 9534 | w->buffer)); | ||
| 9531 | new_cursor_width = -1; | 9535 | new_cursor_width = -1; |
| 9532 | if (cursor_in_echo_area | 9536 | if (cursor_in_echo_area |
| 9533 | && FRAME_HAS_MINIBUF_P (f) | 9537 | && FRAME_HAS_MINIBUF_P (f) |
| @@ -9546,11 +9550,10 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y) | |||
| 9546 | if (f != FRAME_W32_DISPLAY_INFO (f)->w32_highlight_frame | 9550 | if (f != FRAME_W32_DISPLAY_INFO (f)->w32_highlight_frame |
| 9547 | || w != XWINDOW (f->selected_window)) | 9551 | || w != XWINDOW (f->selected_window)) |
| 9548 | { | 9552 | { |
| 9549 | extern int cursor_in_non_selected_windows; | ||
| 9550 | active_cursor = 0; | 9553 | active_cursor = 0; |
| 9551 | 9554 | ||
| 9552 | if (MINI_WINDOW_P (w) | 9555 | if (MINI_WINDOW_P (w) |
| 9553 | || !cursor_in_non_selected_windows | 9556 | || !cursor_non_selected |
| 9554 | || NILP (XBUFFER (w->buffer)->cursor_type)) | 9557 | || NILP (XBUFFER (w->buffer)->cursor_type)) |
| 9555 | new_cursor_type = NO_CURSOR; | 9558 | new_cursor_type = NO_CURSOR; |
| 9556 | else | 9559 | else |
diff --git a/src/xterm.c b/src/xterm.c index 83da1b5aec0..5761d5c3be4 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -11460,6 +11460,7 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y) | |||
| 11460 | struct glyph_matrix *current_glyphs; | 11460 | struct glyph_matrix *current_glyphs; |
| 11461 | struct glyph_row *glyph_row; | 11461 | struct glyph_row *glyph_row; |
| 11462 | struct glyph *glyph; | 11462 | struct glyph *glyph; |
| 11463 | int cursor_non_selected; | ||
| 11463 | 11464 | ||
| 11464 | /* This is pointless on invisible frames, and dangerous on garbaged | 11465 | /* This is pointless on invisible frames, and dangerous on garbaged |
| 11465 | windows and frames; in the latter case, the frame or window may | 11466 | windows and frames; in the latter case, the frame or window may |
| @@ -11495,6 +11496,9 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y) | |||
| 11495 | the cursor type given by the frame parameter. If explicitly | 11496 | the cursor type given by the frame parameter. If explicitly |
| 11496 | marked off, draw no cursor. In all other cases, we want a hollow | 11497 | marked off, draw no cursor. In all other cases, we want a hollow |
| 11497 | box cursor. */ | 11498 | box cursor. */ |
| 11499 | cursor_non_selected | ||
| 11500 | = !NILP (Fbuffer_local_value (Qcursor_in_non_selected_windows, | ||
| 11501 | w->buffer)); | ||
| 11498 | new_cursor_width = -1; | 11502 | new_cursor_width = -1; |
| 11499 | if (cursor_in_echo_area | 11503 | if (cursor_in_echo_area |
| 11500 | && FRAME_HAS_MINIBUF_P (f) | 11504 | && FRAME_HAS_MINIBUF_P (f) |
| @@ -11502,7 +11506,7 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y) | |||
| 11502 | { | 11506 | { |
| 11503 | if (w == XWINDOW (echo_area_window)) | 11507 | if (w == XWINDOW (echo_area_window)) |
| 11504 | new_cursor_type = FRAME_DESIRED_CURSOR (f); | 11508 | new_cursor_type = FRAME_DESIRED_CURSOR (f); |
| 11505 | else if (cursor_in_non_selected_windows) | 11509 | else if (cursor_non_selected) |
| 11506 | new_cursor_type = HOLLOW_BOX_CURSOR; | 11510 | new_cursor_type = HOLLOW_BOX_CURSOR; |
| 11507 | else | 11511 | else |
| 11508 | new_cursor_type = NO_CURSOR; | 11512 | new_cursor_type = NO_CURSOR; |
| @@ -11512,10 +11516,8 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y) | |||
| 11512 | if (f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame | 11516 | if (f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame |
| 11513 | || w != XWINDOW (f->selected_window)) | 11517 | || w != XWINDOW (f->selected_window)) |
| 11514 | { | 11518 | { |
| 11515 | extern int cursor_in_non_selected_windows; | ||
| 11516 | |||
| 11517 | if (MINI_WINDOW_P (w) | 11519 | if (MINI_WINDOW_P (w) |
| 11518 | || !cursor_in_non_selected_windows | 11520 | || !cursor_non_selected |
| 11519 | || NILP (XBUFFER (w->buffer)->cursor_type)) | 11521 | || NILP (XBUFFER (w->buffer)->cursor_type)) |
| 11520 | new_cursor_type = NO_CURSOR; | 11522 | new_cursor_type = NO_CURSOR; |
| 11521 | else | 11523 | else |