Mercurial > emacs
diff src/nsterm.m @ 97584:06f7d5858c5a
* nsfns.m (ns-read-file-name): Add casts to avoid warning. (ns-convert-utf8-nfd-to-nfc): Warn if cannot execute correctly. * nsfont.m (nsfont_draw): Compare indexed colors to 0, not nil. * nsterm.h (EmacsView-unlockFocusNeedsFlush:): Add declaration. (EmacsApp-cursor_blink_handler): Remove declaration. * nsterm.m (ns_draw_glyph_string): Update first conditional body to match 01 Feb 2008 changes in xterm.c. (ns_read_socket): Add cast to avoid warning. (EmacsApp-application:openFiles:): Don't call replyToOpenOrPrint: on GNUstep.
author | Adrian Robert <Adrian.B.Robert@gmail.com> |
---|---|
date | Thu, 21 Aug 2008 02:48:58 +0000 |
parents | 09c3a29de655 |
children | d5535f9696b8 |
line wrap: on
line diff
--- a/src/nsterm.m Thu Aug 21 02:31:45 2008 +0000 +++ b/src/nsterm.m Thu Aug 21 02:48:58 2008 +0000 @@ -2273,7 +2273,7 @@ struct frame *f = WINDOW_XFRAME (w); struct glyph *phys_cursor_glyph; int overspill; - unsigned char drawGlyph = 0, cursorType, oldCursorType; + char drawGlyph = 0, cursorType, oldCursorType; int new_cursor_type; int new_cursor_width; int active_cursor; @@ -2928,13 +2928,21 @@ NSTRACE (ns_draw_glyph_string); - if (s->next && s->right_overhang && !s->for_overlaps && s->hl != DRAW_CURSOR) + if (s->next && s->right_overhang && !s->for_overlaps/* && s->hl != DRAW_CURSOR*/) { - xassert (s->next->img == NULL); - n = ns_get_glyph_string_clip_rect (s->next, r); - ns_focus (s->f, r, n); - ns_maybe_dumpglyphs_background (s->next, 1); - ns_unfocus (s->f); + int width; + struct glyph_string *next; + + for (width = 0, next = s->next; next; + width += next->width, next = next->next) + if (next->first_glyph->type != IMAGE_GLYPH) + { + n = ns_get_glyph_string_clip_rect (s->next, r); + ns_focus (s->f, r, n); + ns_maybe_dumpglyphs_background (s->next, 1); + ns_unfocus (s->f); + next->num_clips = 0; + } } if (!s->for_overlaps && s->face->box != FACE_NO_BOX @@ -3044,6 +3052,7 @@ ns_unfocus (s->f); } + s->num_clips = 0; } @@ -3149,7 +3158,7 @@ /* If have pending open-file requests, attend to the next one of those. */ if (ns_pending_files && [ns_pending_files count] != 0 - && [NSApp openFile: [ns_pending_files objectAtIndex: 0]]) + && [(EmacsApp *)NSApp openFile: [ns_pending_files objectAtIndex: 0]]) { [ns_pending_files removeObjectAtIndex: 0]; } @@ -4194,11 +4203,11 @@ while ((file = [files nextObject]) != nil) [ns_pending_files addObject: file]; -#ifdef NS_IMPL_GNUSTEP - [self replyToOpenOrPrint: 0]; -#else +/* TODO: when GNUstep implements this (and we require that version of + GNUstep), remove. */ +#ifndef NS_IMPL_GNUSTEP [self replyToOpenOrPrint: NSApplicationDelegateReplySuccess]; -#endif /* NS_IMPL_GNUSTEP */ +#endif /* !NS_IMPL_GNUSTEP */ }