aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Reitter2008-08-21 15:49:47 +0000
committerDavid Reitter2008-08-21 15:49:47 +0000
commited709b896ce707e1d09f44bd9d17ddff09473bd3 (patch)
tree0adaf6f25e8ae5aba80c112f34f641ecdea6533a /src
parent5e159d07ec0bbb58b27538d5c129e7e6eb146e97 (diff)
downloademacs-ed709b896ce707e1d09f44bd9d17ddff09473bd3.tar.gz
emacs-ed709b896ce707e1d09f44bd9d17ddff09473bd3.zip
ns_draw_window_cursor: fix bug in setting cursor type in inactive
windows. No special treatment for hollow cursor when FRAME_LAST_INACTIVE. Clear w->phys_cursor_on_p if cursor_type==NO_CURSOR.
Diffstat (limited to 'src')
-rw-r--r--src/nsterm.m13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index c077c1aedda..b790ed4a6e2 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -2287,13 +2287,14 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
2287 NSTRACE (dumpcursor); 2287 NSTRACE (dumpcursor);
2288 2288
2289 if (!on_p) // check this? && !w->phys_cursor_on_p) 2289 if (!on_p) // check this? && !w->phys_cursor_on_p)
2290 return; 2290 return;
2291 2291
2292 w->phys_cursor_type = cursor_type; 2292 w->phys_cursor_type = cursor_type;
2293 w->phys_cursor_on_p = on_p; 2293 w->phys_cursor_on_p = on_p;
2294 2294
2295 if (cursor_type == NO_CURSOR) 2295 if (cursor_type == NO_CURSOR)
2296 { 2296 {
2297 w->phys_cursor_on_p = 0;
2297 w->phys_cursor_width = 0; 2298 w->phys_cursor_width = 0;
2298 return; 2299 return;
2299 } 2300 }
@@ -2325,7 +2326,6 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
2325 2326
2326 oldCursorType = FRAME_CURSOR (f); 2327 oldCursorType = FRAME_CURSOR (f);
2327 cursorType = FRAME_CURSOR (f) = FRAME_NEW_CURSOR (f); 2328 cursorType = FRAME_CURSOR (f) = FRAME_NEW_CURSOR (f);
2328
2329 /* TODO: 23: use emacs stored cursor color instead of ns-specific */ 2329 /* TODO: 23: use emacs stored cursor color instead of ns-specific */
2330 f->output_data.ns->current_cursor_color 2330 f->output_data.ns->current_cursor_color
2331 = f->output_data.ns->desired_cursor_color; 2331 = f->output_data.ns->desired_cursor_color;
@@ -2335,14 +2335,16 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
2335 ns_clip_to_row (w, glyph_row, -1, NO); 2335 ns_clip_to_row (w, glyph_row, -1, NO);
2336/* ns_focus (f, &r, 1); */ 2336/* ns_focus (f, &r, 1); */
2337 2337
2338 if (FRAME_LAST_INACTIVE (f)) 2338 /* Why would this be needed?
2339 if (FRAME_LAST_INACTIVE (f))
2339 { 2340 {
2340 /* previously hollow box; clear entire area */ 2341 * previously hollow box; clear entire area *
2341 [FRAME_BACKGROUND_COLOR (f) set]; 2342 [FRAME_BACKGROUND_COLOR (f) set];
2342 NSRectFill (r); 2343 NSRectFill (r);
2343 drawGlyph = 1; 2344 drawGlyph = 1;
2344 FRAME_LAST_INACTIVE (f) = NO; 2345 FRAME_LAST_INACTIVE (f) = NO;
2345 } 2346 }
2347 */
2346 2348
2347 /* prepare to draw */ 2349 /* prepare to draw */
2348 if (cursorType == no_highlight || cursor_type == NO_CURSOR) 2350 if (cursorType == no_highlight || cursor_type == NO_CURSOR)
@@ -2424,8 +2426,7 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
2424 if (!active_p) 2426 if (!active_p)
2425 { 2427 {
2426 /* inactive window: ignore what we just set and use a hollow box */ 2428 /* inactive window: ignore what we just set and use a hollow box */
2427 cursorType = hollow_box; 2429 cursorType = HOLLOW_BOX_CURSOR;
2428 [FRAME_CURSOR_COLOR (f) set];
2429 } 2430 }
2430 2431
2431 NSDisableScreenUpdates (); 2432 NSDisableScreenUpdates ();