mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-23 22:20:24 -08:00
Merge from origin/emacs-26
9ad0f1d15cFix deprecation warning7946445962Make all NS drawing be done from drawRect41fa88b99b; Fix some doc typos
This commit is contained in:
commit
6217746dd6
4 changed files with 403 additions and 404 deletions
|
|
@ -532,7 +532,7 @@ DIR is the directory to apply to new targets."
|
||||||
(project-rescan tmp)
|
(project-rescan tmp)
|
||||||
(setq ntargets (cons tmp ntargets)))
|
(setq ntargets (cons tmp ntargets)))
|
||||||
(makefile-macro-file-list macro))
|
(makefile-macro-file-list macro))
|
||||||
;; Non-indirect will have a target whos sources
|
;; Non-indirect will have a target whose sources
|
||||||
;; are actual files, not names of other targets.
|
;; are actual files, not names of other targets.
|
||||||
(let ((files (makefile-macro-file-list macro)))
|
(let ((files (makefile-macro-file-list macro)))
|
||||||
(when files
|
(when files
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ Abstract tables would be difficult to reference."
|
||||||
|
|
||||||
(cl-defmethod semanticdb-check-references ((dbt semanticdb-table))
|
(cl-defmethod semanticdb-check-references ((dbt semanticdb-table))
|
||||||
"Check and cleanup references in the database DBT.
|
"Check and cleanup references in the database DBT.
|
||||||
Any reference to a file that cannot be found, or whos file no longer
|
Any reference to a file that cannot be found, or whose file no longer
|
||||||
refers to DBT will be removed."
|
refers to DBT will be removed."
|
||||||
(let ((refs (oref dbt db-refs))
|
(let ((refs (oref dbt db-refs))
|
||||||
(myexpr (concat "\\<" (oref dbt file)))
|
(myexpr (concat "\\<" (oref dbt file)))
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ Saves scoping information between runs of the analyzer.")
|
||||||
(cl-defmethod semantic-scope-set-typecache ((cache semantic-scope-cache)
|
(cl-defmethod semantic-scope-set-typecache ((cache semantic-scope-cache)
|
||||||
types-in-scope)
|
types-in-scope)
|
||||||
"Set the :typescope property on CACHE to some types.
|
"Set the :typescope property on CACHE to some types.
|
||||||
TYPES-IN-SCOPE is a list of type tags whos members are
|
TYPES-IN-SCOPE is a list of type tags whose members are
|
||||||
currently in scope. For each type in TYPES-IN-SCOPE,
|
currently in scope. For each type in TYPES-IN-SCOPE,
|
||||||
add those members to the types list.
|
add those members to the types list.
|
||||||
If nil, then the typescope is reset."
|
If nil, then the typescope is reset."
|
||||||
|
|
|
||||||
227
src/nsterm.m
227
src/nsterm.m
|
|
@ -278,12 +278,7 @@ struct ns_display_info *x_display_list; /* Chain of existing displays */
|
||||||
long context_menu_value = 0;
|
long context_menu_value = 0;
|
||||||
|
|
||||||
/* display update */
|
/* display update */
|
||||||
static struct frame *ns_updating_frame;
|
|
||||||
static NSView *focus_view = NULL;
|
|
||||||
static int ns_window_num = 0;
|
static int ns_window_num = 0;
|
||||||
#ifdef NS_IMPL_GNUSTEP
|
|
||||||
static NSRect uRect; // TODO: This is dead, remove it?
|
|
||||||
#endif
|
|
||||||
static BOOL gsaved = NO;
|
static BOOL gsaved = NO;
|
||||||
static BOOL ns_fake_keydown = NO;
|
static BOOL ns_fake_keydown = NO;
|
||||||
#ifdef NS_IMPL_COCOA
|
#ifdef NS_IMPL_COCOA
|
||||||
|
|
@ -1093,12 +1088,13 @@ ns_update_begin (struct frame *f)
|
||||||
external (RIF) call; whole frame, called before update_window_begin
|
external (RIF) call; whole frame, called before update_window_begin
|
||||||
-------------------------------------------------------------------------- */
|
-------------------------------------------------------------------------- */
|
||||||
{
|
{
|
||||||
|
#ifdef NS_IMPL_COCOA
|
||||||
EmacsView *view = FRAME_NS_VIEW (f);
|
EmacsView *view = FRAME_NS_VIEW (f);
|
||||||
|
|
||||||
NSTRACE_WHEN (NSTRACE_GROUP_UPDATES, "ns_update_begin");
|
NSTRACE_WHEN (NSTRACE_GROUP_UPDATES, "ns_update_begin");
|
||||||
|
|
||||||
ns_update_auto_hide_menu_bar ();
|
ns_update_auto_hide_menu_bar ();
|
||||||
|
|
||||||
#ifdef NS_IMPL_COCOA
|
|
||||||
if ([view isFullscreen] && [view fsIsNative])
|
if ([view isFullscreen] && [view fsIsNative])
|
||||||
{
|
{
|
||||||
// Fix reappearing tool bar in fullscreen for Mac OS X 10.7
|
// Fix reappearing tool bar in fullscreen for Mac OS X 10.7
|
||||||
|
|
@ -1107,16 +1103,13 @@ ns_update_begin (struct frame *f)
|
||||||
if (! tbar_visible != ! [toolbar isVisible])
|
if (! tbar_visible != ! [toolbar isVisible])
|
||||||
[toolbar setVisible: tbar_visible];
|
[toolbar setVisible: tbar_visible];
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
ns_updating_frame = f;
|
|
||||||
[view lockFocus];
|
|
||||||
|
|
||||||
/* drawRect may have been called for say the minibuffer, and then clip path
|
/* drawRect may have been called for say the minibuffer, and then clip path
|
||||||
is for the minibuffer. But the display engine may draw more because
|
is for the minibuffer. But the display engine may draw more because
|
||||||
we have set the frame as garbaged. So reset clip path to the whole
|
we have set the frame as garbaged. So reset clip path to the whole
|
||||||
view. */
|
view. */
|
||||||
#ifdef NS_IMPL_COCOA
|
/* FIXME: I don't think we need to do this. */
|
||||||
|
if ([NSView focusView] == FRAME_NS_VIEW (f))
|
||||||
{
|
{
|
||||||
NSBezierPath *bp;
|
NSBezierPath *bp;
|
||||||
NSRect r = [view frame];
|
NSRect r = [view frame];
|
||||||
|
|
@ -1134,10 +1127,6 @@ ns_update_begin (struct frame *f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NS_IMPL_GNUSTEP
|
|
||||||
uRect = NSMakeRect (0, 0, 0, 0);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1218,60 +1207,27 @@ ns_update_end (struct frame *f)
|
||||||
external (RIF) call; for whole frame, called after update_window_end
|
external (RIF) call; for whole frame, called after update_window_end
|
||||||
-------------------------------------------------------------------------- */
|
-------------------------------------------------------------------------- */
|
||||||
{
|
{
|
||||||
EmacsView *view = FRAME_NS_VIEW (f);
|
|
||||||
|
|
||||||
NSTRACE_WHEN (NSTRACE_GROUP_UPDATES, "ns_update_end");
|
NSTRACE_WHEN (NSTRACE_GROUP_UPDATES, "ns_update_end");
|
||||||
|
|
||||||
/* if (f == MOUSE_HL_INFO (f)->mouse_face_mouse_frame) */
|
/* if (f == MOUSE_HL_INFO (f)->mouse_face_mouse_frame) */
|
||||||
MOUSE_HL_INFO (f)->mouse_face_defer = 0;
|
MOUSE_HL_INFO (f)->mouse_face_defer = 0;
|
||||||
|
|
||||||
block_input ();
|
|
||||||
|
|
||||||
[view unlockFocus];
|
|
||||||
[[view window] flushWindow];
|
|
||||||
|
|
||||||
unblock_input ();
|
|
||||||
ns_updating_frame = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
ns_focus (struct frame *f, NSRect *r, int n)
|
static BOOL
|
||||||
|
ns_clip_to_rect (struct frame *f, NSRect *r, int n)
|
||||||
/* --------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------
|
||||||
Internal: Focus on given frame. During small local updates this is used to
|
Clip the drawing area to rectangle r in frame f. If drawing is not
|
||||||
draw, however during large updates, ns_update_begin and ns_update_end are
|
currently possible mark r as dirty and return NO, otherwise return
|
||||||
called to wrap the whole thing, in which case these calls are stubbed out.
|
YES.
|
||||||
Except, on GNUstep, we accumulate the rectangle being drawn into, because
|
|
||||||
the back end won't do this automatically, and will just end up flushing
|
|
||||||
the entire window.
|
|
||||||
-------------------------------------------------------------------------- */
|
-------------------------------------------------------------------------- */
|
||||||
{
|
{
|
||||||
NSTRACE_WHEN (NSTRACE_GROUP_FOCUS, "ns_focus");
|
NSTRACE_WHEN (NSTRACE_GROUP_FOCUS, "ns_clip_to_rect");
|
||||||
if (r != NULL)
|
if (r)
|
||||||
{
|
{
|
||||||
NSTRACE_RECT ("r", *r);
|
NSTRACE_RECT ("r", *r);
|
||||||
}
|
|
||||||
|
|
||||||
if (f != ns_updating_frame)
|
if ([NSView focusView] == FRAME_NS_VIEW (f))
|
||||||
{
|
|
||||||
NSView *view = FRAME_NS_VIEW (f);
|
|
||||||
if (view != focus_view)
|
|
||||||
{
|
|
||||||
if (focus_view != NULL)
|
|
||||||
{
|
|
||||||
[focus_view unlockFocus];
|
|
||||||
[[focus_view window] flushWindow];
|
|
||||||
/* debug_lock--; */
|
|
||||||
}
|
|
||||||
|
|
||||||
if (view)
|
|
||||||
[view lockFocus];
|
|
||||||
focus_view = view;
|
|
||||||
/* if (view) debug_lock++; */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* clipping */
|
|
||||||
if (r)
|
|
||||||
{
|
{
|
||||||
[[NSGraphicsContext currentContext] saveGraphicsState];
|
[[NSGraphicsContext currentContext] saveGraphicsState];
|
||||||
if (n == 2)
|
if (n == 2)
|
||||||
|
|
@ -1279,38 +1235,38 @@ ns_focus (struct frame *f, NSRect *r, int n)
|
||||||
else
|
else
|
||||||
NSRectClip (*r);
|
NSRectClip (*r);
|
||||||
gsaved = YES;
|
gsaved = YES;
|
||||||
|
|
||||||
|
return YES;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NSView *view = FRAME_NS_VIEW (f);
|
||||||
|
int i;
|
||||||
|
for (i = 0 ; i < n ; i++)
|
||||||
|
[view setNeedsDisplayInRect:r[i]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ns_unfocus (struct frame *f)
|
ns_reset_clipping (struct frame *f)
|
||||||
/* --------------------------------------------------------------------------
|
/* Internal: Restore the previous graphics state, unsetting any
|
||||||
Internal: Remove focus on given frame
|
clipping areas. */
|
||||||
-------------------------------------------------------------------------- */
|
|
||||||
{
|
{
|
||||||
NSTRACE_WHEN (NSTRACE_GROUP_FOCUS, "ns_unfocus");
|
NSTRACE_WHEN (NSTRACE_GROUP_FOCUS, "ns_reset_clipping");
|
||||||
|
|
||||||
if (gsaved)
|
if (gsaved)
|
||||||
{
|
{
|
||||||
[[NSGraphicsContext currentContext] restoreGraphicsState];
|
[[NSGraphicsContext currentContext] restoreGraphicsState];
|
||||||
gsaved = NO;
|
gsaved = NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (f != ns_updating_frame)
|
|
||||||
{
|
|
||||||
if (focus_view != NULL)
|
|
||||||
{
|
|
||||||
[focus_view unlockFocus];
|
|
||||||
[[focus_view window] flushWindow];
|
|
||||||
focus_view = NULL;
|
|
||||||
/* debug_lock--; */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static BOOL
|
||||||
ns_clip_to_row (struct window *w, struct glyph_row *row,
|
ns_clip_to_row (struct window *w, struct glyph_row *row,
|
||||||
enum glyph_row_area area, BOOL gc)
|
enum glyph_row_area area, BOOL gc)
|
||||||
/* --------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------
|
||||||
|
|
@ -1329,7 +1285,19 @@ ns_clip_to_row (struct window *w, struct glyph_row *row,
|
||||||
clip_rect.size.width = window_width;
|
clip_rect.size.width = window_width;
|
||||||
clip_rect.size.height = row->visible_height;
|
clip_rect.size.height = row->visible_height;
|
||||||
|
|
||||||
ns_focus (f, &clip_rect, 1);
|
return ns_clip_to_rect (f, &clip_rect, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
ns_flush_display (struct frame *f)
|
||||||
|
/* Force the frame to redisplay. If areas have previously been marked
|
||||||
|
dirty by setNeedsDisplayInRect (in ns_clip_to_rect), then this will call
|
||||||
|
draw_rect: which will "expose" those areas. */
|
||||||
|
{
|
||||||
|
block_input ();
|
||||||
|
[FRAME_NS_VIEW (f) displayIfNeeded];
|
||||||
|
unblock_input ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -2826,14 +2794,16 @@ ns_clear_frame (struct frame *f)
|
||||||
r = [view bounds];
|
r = [view bounds];
|
||||||
|
|
||||||
block_input ();
|
block_input ();
|
||||||
ns_focus (f, &r, 1);
|
if (ns_clip_to_rect (f, &r, 1))
|
||||||
|
{
|
||||||
[ns_lookup_indexed_color (NS_FACE_BACKGROUND
|
[ns_lookup_indexed_color (NS_FACE_BACKGROUND
|
||||||
(FACE_FROM_ID (f, DEFAULT_FACE_ID)), f) set];
|
(FACE_FROM_ID (f, DEFAULT_FACE_ID)), f) set];
|
||||||
NSRectFill (r);
|
NSRectFill (r);
|
||||||
ns_unfocus (f);
|
ns_reset_clipping (f);
|
||||||
|
|
||||||
/* as of 2006/11 or so this is now needed */
|
/* as of 2006/11 or so this is now needed */
|
||||||
ns_redraw_scroll_bars (f);
|
ns_redraw_scroll_bars (f);
|
||||||
|
}
|
||||||
unblock_input ();
|
unblock_input ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2854,13 +2824,14 @@ ns_clear_frame_area (struct frame *f, int x, int y, int width, int height)
|
||||||
NSTRACE_WHEN (NSTRACE_GROUP_UPDATES, "ns_clear_frame_area");
|
NSTRACE_WHEN (NSTRACE_GROUP_UPDATES, "ns_clear_frame_area");
|
||||||
|
|
||||||
r = NSIntersectionRect (r, [view frame]);
|
r = NSIntersectionRect (r, [view frame]);
|
||||||
ns_focus (f, &r, 1);
|
if (ns_clip_to_rect (f, &r, 1))
|
||||||
|
{
|
||||||
[ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), f) set];
|
[ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), f) set];
|
||||||
|
|
||||||
NSRectFill (r);
|
NSRectFill (r);
|
||||||
|
|
||||||
ns_unfocus (f);
|
ns_reset_clipping (f);
|
||||||
return;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -2872,11 +2843,11 @@ ns_copy_bits (struct frame *f, NSRect src, NSRect dest)
|
||||||
{
|
{
|
||||||
hide_bell(); // Ensure the bell image isn't scrolled.
|
hide_bell(); // Ensure the bell image isn't scrolled.
|
||||||
|
|
||||||
ns_focus (f, &dest, 1);
|
/* FIXME: scrollRect:by: is deprecated in macOS 10.14. There is
|
||||||
|
no obvious replacement so we may have to come up with our own. */
|
||||||
[FRAME_NS_VIEW (f) scrollRect: src
|
[FRAME_NS_VIEW (f) scrollRect: src
|
||||||
by: NSMakeSize (dest.origin.x - src.origin.x,
|
by: NSMakeSize (dest.origin.x - src.origin.x,
|
||||||
dest.origin.y - src.origin.y)];
|
dest.origin.y - src.origin.y)];
|
||||||
ns_unfocus (f);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3087,8 +3058,8 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Must clip because of partially visible lines. */
|
/* Must clip because of partially visible lines. */
|
||||||
ns_clip_to_row (w, row, ANY_AREA, YES);
|
if (ns_clip_to_row (w, row, ANY_AREA, YES))
|
||||||
|
{
|
||||||
if (!p->overlay_p)
|
if (!p->overlay_p)
|
||||||
{
|
{
|
||||||
int bx = p->bx, by = p->by, nx = p->nx, ny = p->ny;
|
int bx = p->bx, by = p->by, nx = p->nx, ny = p->ny;
|
||||||
|
|
@ -3165,7 +3136,8 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
ns_unfocus (f);
|
ns_reset_clipping (f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -3248,9 +3220,8 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
|
||||||
r.size.width = w->phys_cursor_width;
|
r.size.width = w->phys_cursor_width;
|
||||||
|
|
||||||
/* Prevent the cursor from being drawn outside the text area. */
|
/* Prevent the cursor from being drawn outside the text area. */
|
||||||
ns_clip_to_row (w, glyph_row, TEXT_AREA, NO); /* do ns_focus(f, &r, 1); if remove */
|
if (ns_clip_to_row (w, glyph_row, TEXT_AREA, NO))
|
||||||
|
{
|
||||||
|
|
||||||
face = FACE_FROM_ID_OR_NULL (f, phys_cursor_glyph->face_id);
|
face = FACE_FROM_ID_OR_NULL (f, phys_cursor_glyph->face_id);
|
||||||
if (face && NS_FACE_BACKGROUND (face)
|
if (face && NS_FACE_BACKGROUND (face)
|
||||||
== ns_index_color (FRAME_CURSOR_COLOR (f), f))
|
== ns_index_color (FRAME_CURSOR_COLOR (f), f))
|
||||||
|
|
@ -3266,7 +3237,7 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
|
||||||
atomic. Cleaner ways of doing this should be investigated.
|
atomic. Cleaner ways of doing this should be investigated.
|
||||||
One way would be to set a global variable DRAWING_CURSOR
|
One way would be to set a global variable DRAWING_CURSOR
|
||||||
when making the call to draw_phys..(), don't focus in that
|
when making the call to draw_phys..(), don't focus in that
|
||||||
case, then move the ns_unfocus() here after that call. */
|
case, then move the ns_reset_clipping() here after that call. */
|
||||||
NSDisableScreenUpdates ();
|
NSDisableScreenUpdates ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -3298,7 +3269,7 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
|
||||||
NSRectFill (s);
|
NSRectFill (s);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ns_unfocus (f);
|
ns_reset_clipping (f);
|
||||||
|
|
||||||
/* draw the character under the cursor */
|
/* draw the character under the cursor */
|
||||||
if (cursor_type != NO_CURSOR)
|
if (cursor_type != NO_CURSOR)
|
||||||
|
|
@ -3307,7 +3278,7 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
|
||||||
#ifdef NS_IMPL_COCOA
|
#ifdef NS_IMPL_COCOA
|
||||||
NSEnableScreenUpdates ();
|
NSEnableScreenUpdates ();
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -3325,12 +3296,14 @@ ns_draw_vertical_window_border (struct window *w, int x, int y0, int y1)
|
||||||
|
|
||||||
face = FACE_FROM_ID_OR_NULL (f, VERTICAL_BORDER_FACE_ID);
|
face = FACE_FROM_ID_OR_NULL (f, VERTICAL_BORDER_FACE_ID);
|
||||||
|
|
||||||
ns_focus (f, &r, 1);
|
if (ns_clip_to_rect (f, &r, 1))
|
||||||
|
{
|
||||||
if (face)
|
if (face)
|
||||||
[ns_lookup_indexed_color(face->foreground, f) set];
|
[ns_lookup_indexed_color(face->foreground, f) set];
|
||||||
|
|
||||||
NSRectFill(r);
|
NSRectFill(r);
|
||||||
ns_unfocus (f);
|
ns_reset_clipping (f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -3357,8 +3330,8 @@ ns_draw_window_divider (struct window *w, int x0, int x1, int y0, int y1)
|
||||||
|
|
||||||
NSTRACE ("ns_draw_window_divider");
|
NSTRACE ("ns_draw_window_divider");
|
||||||
|
|
||||||
ns_focus (f, ÷r, 1);
|
if (ns_clip_to_rect (f, ÷r, 1))
|
||||||
|
{
|
||||||
if ((y1 - y0 > x1 - x0) && (x1 - x0 >= 3))
|
if ((y1 - y0 > x1 - x0) && (x1 - x0 >= 3))
|
||||||
/* A vertical divider, at least three pixels wide: Draw first and
|
/* A vertical divider, at least three pixels wide: Draw first and
|
||||||
last pixels differently. */
|
last pixels differently. */
|
||||||
|
|
@ -3389,7 +3362,8 @@ ns_draw_window_divider (struct window *w, int x0, int x1, int y0, int y1)
|
||||||
NSRectFill(divider);
|
NSRectFill(divider);
|
||||||
}
|
}
|
||||||
|
|
||||||
ns_unfocus (f);
|
ns_reset_clipping (f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -3988,8 +3962,8 @@ ns_dumpglyphs_stretch (struct glyph_string *s)
|
||||||
n = ns_get_glyph_string_clip_rect (s, r);
|
n = ns_get_glyph_string_clip_rect (s, r);
|
||||||
*r = NSMakeRect (s->x, s->y, s->background_width, s->height);
|
*r = NSMakeRect (s->x, s->y, s->background_width, s->height);
|
||||||
|
|
||||||
ns_focus (s->f, r, n);
|
if (ns_clip_to_rect (s->f, r, n))
|
||||||
|
{
|
||||||
if (s->hl == DRAW_MOUSE_FACE)
|
if (s->hl == DRAW_MOUSE_FACE)
|
||||||
{
|
{
|
||||||
face = FACE_FROM_ID_OR_NULL (s->f,
|
face = FACE_FROM_ID_OR_NULL (s->f,
|
||||||
|
|
@ -4064,7 +4038,8 @@ ns_dumpglyphs_stretch (struct glyph_string *s)
|
||||||
ns_draw_text_decoration (s, face, fgCol, r[i].size.width,
|
ns_draw_text_decoration (s, face, fgCol, r[i].size.width,
|
||||||
r[i].origin.x);
|
r[i].origin.x);
|
||||||
}
|
}
|
||||||
ns_unfocus (s->f);
|
ns_reset_clipping (s->f);
|
||||||
|
}
|
||||||
s->background_filled_p = 1;
|
s->background_filled_p = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4214,9 +4189,11 @@ ns_draw_glyph_string (struct glyph_string *s)
|
||||||
if (next->first_glyph->type != STRETCH_GLYPH)
|
if (next->first_glyph->type != STRETCH_GLYPH)
|
||||||
{
|
{
|
||||||
n = ns_get_glyph_string_clip_rect (s->next, r);
|
n = ns_get_glyph_string_clip_rect (s->next, r);
|
||||||
ns_focus (s->f, r, n);
|
if (ns_clip_to_rect (s->f, r, n))
|
||||||
|
{
|
||||||
ns_maybe_dumpglyphs_background (s->next, 1);
|
ns_maybe_dumpglyphs_background (s->next, 1);
|
||||||
ns_unfocus (s->f);
|
ns_reset_clipping (s->f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -4231,10 +4208,12 @@ ns_draw_glyph_string (struct glyph_string *s)
|
||||||
|| s->first_glyph->type == COMPOSITE_GLYPH))
|
|| s->first_glyph->type == COMPOSITE_GLYPH))
|
||||||
{
|
{
|
||||||
n = ns_get_glyph_string_clip_rect (s, r);
|
n = ns_get_glyph_string_clip_rect (s, r);
|
||||||
ns_focus (s->f, r, n);
|
if (ns_clip_to_rect (s->f, r, n))
|
||||||
|
{
|
||||||
ns_maybe_dumpglyphs_background (s, 1);
|
ns_maybe_dumpglyphs_background (s, 1);
|
||||||
ns_dumpglyphs_box_or_relief (s);
|
ns_dumpglyphs_box_or_relief (s);
|
||||||
ns_unfocus (s->f);
|
ns_reset_clipping (s->f);
|
||||||
|
}
|
||||||
box_drawn_p = 1;
|
box_drawn_p = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4243,9 +4222,11 @@ ns_draw_glyph_string (struct glyph_string *s)
|
||||||
|
|
||||||
case IMAGE_GLYPH:
|
case IMAGE_GLYPH:
|
||||||
n = ns_get_glyph_string_clip_rect (s, r);
|
n = ns_get_glyph_string_clip_rect (s, r);
|
||||||
ns_focus (s->f, r, n);
|
if (ns_clip_to_rect (s->f, r, n))
|
||||||
|
{
|
||||||
ns_dumpglyphs_image (s, r[0]);
|
ns_dumpglyphs_image (s, r[0]);
|
||||||
ns_unfocus (s->f);
|
ns_reset_clipping (s->f);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STRETCH_GLYPH:
|
case STRETCH_GLYPH:
|
||||||
|
|
@ -4255,8 +4236,8 @@ ns_draw_glyph_string (struct glyph_string *s)
|
||||||
case CHAR_GLYPH:
|
case CHAR_GLYPH:
|
||||||
case COMPOSITE_GLYPH:
|
case COMPOSITE_GLYPH:
|
||||||
n = ns_get_glyph_string_clip_rect (s, r);
|
n = ns_get_glyph_string_clip_rect (s, r);
|
||||||
ns_focus (s->f, r, n);
|
if (ns_clip_to_rect (s->f, r, n))
|
||||||
|
{
|
||||||
if (s->for_overlaps || (s->cmp_from > 0
|
if (s->for_overlaps || (s->cmp_from > 0
|
||||||
&& ! s->first_glyph->u.cmp.automatic))
|
&& ! s->first_glyph->u.cmp.automatic))
|
||||||
s->background_filled_p = 1;
|
s->background_filled_p = 1;
|
||||||
|
|
@ -4298,13 +4279,14 @@ ns_draw_glyph_string (struct glyph_string *s)
|
||||||
NS_FACE_FOREGROUND (s->face) = tmp;
|
NS_FACE_FOREGROUND (s->face) = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
ns_unfocus (s->f);
|
ns_reset_clipping (s->f);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GLYPHLESS_GLYPH:
|
case GLYPHLESS_GLYPH:
|
||||||
n = ns_get_glyph_string_clip_rect (s, r);
|
n = ns_get_glyph_string_clip_rect (s, r);
|
||||||
ns_focus (s->f, r, n);
|
if (ns_clip_to_rect (s->f, r, n))
|
||||||
|
{
|
||||||
if (s->for_overlaps || (s->cmp_from > 0
|
if (s->for_overlaps || (s->cmp_from > 0
|
||||||
&& ! s->first_glyph->u.cmp.automatic))
|
&& ! s->first_glyph->u.cmp.automatic))
|
||||||
s->background_filled_p = 1;
|
s->background_filled_p = 1;
|
||||||
|
|
@ -4314,7 +4296,8 @@ ns_draw_glyph_string (struct glyph_string *s)
|
||||||
/* ... */
|
/* ... */
|
||||||
/* Not yet implemented. */
|
/* Not yet implemented. */
|
||||||
/* ... */
|
/* ... */
|
||||||
ns_unfocus (s->f);
|
ns_reset_clipping (s->f);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
@ -4325,9 +4308,11 @@ ns_draw_glyph_string (struct glyph_string *s)
|
||||||
if (!s->for_overlaps && !box_drawn_p && s->face->box != FACE_NO_BOX)
|
if (!s->for_overlaps && !box_drawn_p && s->face->box != FACE_NO_BOX)
|
||||||
{
|
{
|
||||||
n = ns_get_glyph_string_clip_rect (s, r);
|
n = ns_get_glyph_string_clip_rect (s, r);
|
||||||
ns_focus (s->f, r, n);
|
if (ns_clip_to_rect (s->f, r, n))
|
||||||
|
{
|
||||||
ns_dumpglyphs_box_or_relief (s);
|
ns_dumpglyphs_box_or_relief (s);
|
||||||
ns_unfocus (s->f);
|
ns_reset_clipping (s->f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s->num_clips = 0;
|
s->num_clips = 0;
|
||||||
|
|
@ -5133,7 +5118,7 @@ static struct redisplay_interface ns_redisplay_interface =
|
||||||
ns_after_update_window_line,
|
ns_after_update_window_line,
|
||||||
ns_update_window_begin,
|
ns_update_window_begin,
|
||||||
ns_update_window_end,
|
ns_update_window_end,
|
||||||
0, /* flush_display */
|
ns_flush_display, /* flush_display */
|
||||||
x_clear_window_mouse_face,
|
x_clear_window_mouse_face,
|
||||||
x_get_glyph_overhangs,
|
x_get_glyph_overhangs,
|
||||||
x_fix_overlapping_area,
|
x_fix_overlapping_area,
|
||||||
|
|
@ -5350,7 +5335,21 @@ ns_term_init (Lisp_Object display_name)
|
||||||
alpha: 1.0]
|
alpha: 1.0]
|
||||||
forKey: [NSString stringWithUTF8String: name]];
|
forKey: [NSString stringWithUTF8String: name]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FIXME: Report any errors writing the color file below. */
|
||||||
|
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101100
|
||||||
|
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100
|
||||||
|
if ([cl respondsToSelector:@selector(writeToURL:error:)])
|
||||||
|
#endif
|
||||||
|
[cl writeToURL:nil error:nil];
|
||||||
|
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 101100 */
|
||||||
|
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100 \
|
||||||
|
|| defined (NS_IMPL_GNUSTEP)
|
||||||
[cl writeToFile: nil];
|
[cl writeToFile: nil];
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue