diff options
| author | Richard M. Stallman | 2007-10-02 02:13:15 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2007-10-02 02:13:15 +0000 |
| commit | 65dad34af68691b0c9ff6c3d2fe042210726512d (patch) | |
| tree | 2e040b200772c8612b4a71d4c9433b42e425aeee /src | |
| parent | 7ed54cc54ebeff84f2d6f655c115edd9bc258524 (diff) | |
| download | emacs-65dad34af68691b0c9ff6c3d2fe042210726512d.tar.gz emacs-65dad34af68691b0c9ff6c3d2fe042210726512d.zip | |
(get_window_cursor_type): Implement documented behavior
for cursor-in-non-selected-windows = t.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xdisp.c | 24 |
2 files changed, 21 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 0c79acd6b45..068ad522546 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-10-02 Richard Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (get_window_cursor_type): Implement documented behavior | ||
| 4 | for cursor-in-non-selected-windows = t. | ||
| 5 | |||
| 1 | 2007-09-29 Juri Linkov <juri@jurta.org> | 6 | 2007-09-29 Juri Linkov <juri@jurta.org> |
| 2 | 7 | ||
| 3 | * emacs.c (standard_args): Change priority of "--no-splash" | 8 | * emacs.c (standard_args): Change priority of "--no-splash" |
diff --git a/src/xdisp.c b/src/xdisp.c index a1c027b895e..ab4263fd83c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -21299,7 +21299,7 @@ get_window_cursor_type (w, glyph, width, active_cursor) | |||
| 21299 | non_selected = 1; | 21299 | non_selected = 1; |
| 21300 | } | 21300 | } |
| 21301 | 21301 | ||
| 21302 | /* Nonselected window or nonselected frame. */ | 21302 | /* Detect a nonselected window or nonselected frame. */ |
| 21303 | else if (w != XWINDOW (f->selected_window) | 21303 | else if (w != XWINDOW (f->selected_window) |
| 21304 | #ifdef HAVE_WINDOW_SYSTEM | 21304 | #ifdef HAVE_WINDOW_SYSTEM |
| 21305 | || f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame | 21305 | || f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame |
| @@ -21318,13 +21318,6 @@ get_window_cursor_type (w, glyph, width, active_cursor) | |||
| 21318 | if (NILP (b->cursor_type)) | 21318 | if (NILP (b->cursor_type)) |
| 21319 | return NO_CURSOR; | 21319 | return NO_CURSOR; |
| 21320 | 21320 | ||
| 21321 | /* Use cursor-in-non-selected-windows for non-selected window or frame. */ | ||
| 21322 | if (non_selected) | ||
| 21323 | { | ||
| 21324 | alt_cursor = b->cursor_in_non_selected_windows; | ||
| 21325 | return get_specified_cursor_type (alt_cursor, width); | ||
| 21326 | } | ||
| 21327 | |||
| 21328 | /* Get the normal cursor type for this window. */ | 21321 | /* Get the normal cursor type for this window. */ |
| 21329 | if (EQ (b->cursor_type, Qt)) | 21322 | if (EQ (b->cursor_type, Qt)) |
| 21330 | { | 21323 | { |
| @@ -21334,6 +21327,21 @@ get_window_cursor_type (w, glyph, width, active_cursor) | |||
| 21334 | else | 21327 | else |
| 21335 | cursor_type = get_specified_cursor_type (b->cursor_type, width); | 21328 | cursor_type = get_specified_cursor_type (b->cursor_type, width); |
| 21336 | 21329 | ||
| 21330 | /* Use cursor-in-non-selected-windows instead | ||
| 21331 | for non-selected window or frame. */ | ||
| 21332 | if (non_selected) | ||
| 21333 | { | ||
| 21334 | alt_cursor = b->cursor_in_non_selected_windows; | ||
| 21335 | if (!EQ (Qt, alt_cursor)) | ||
| 21336 | return get_specified_cursor_type (alt_cursor, width); | ||
| 21337 | /* t means modify the normal cursor type. */ | ||
| 21338 | if (cursor_type == FILLED_BOX_CURSOR) | ||
| 21339 | cursor_type = HOLLOW_BOX_CURSOR; | ||
| 21340 | else if (cursor_type == BAR_CURSOR && *width > 1) | ||
| 21341 | --*width; | ||
| 21342 | return cursor_type; | ||
| 21343 | } | ||
| 21344 | |||
| 21337 | /* Use normal cursor if not blinked off. */ | 21345 | /* Use normal cursor if not blinked off. */ |
| 21338 | if (!w->cursor_off_p) | 21346 | if (!w->cursor_off_p) |
| 21339 | { | 21347 | { |