diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsterm.m | 13 |
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 (); |