mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-23 10:34:07 +00:00
* nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
compositeToPoint for OSX < 10.6. Fixes: debbugs:12390
This commit is contained in:
parent
0979429b33
commit
9d7f18633a
@ -1,3 +1,8 @@
|
||||
2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
|
||||
|
||||
* nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
|
||||
compositeToPoint for OSX < 10.6 (Bug#12390).
|
||||
|
||||
2012-09-08 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
|
||||
|
39
src/nsterm.m
39
src/nsterm.m
@ -650,7 +650,7 @@ Free a pool and temporary objects it refers to (callable from C)
|
||||
struct frame *f = XFRAME (WINDOW_FRAME (w));
|
||||
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
|
||||
NSTRACE (ns_update_window_begin);
|
||||
|
||||
fprintf(stderr, "%s\n", __func__);
|
||||
updated_window = w;
|
||||
set_output_cursor (&w->cursor);
|
||||
|
||||
@ -683,6 +683,7 @@ Free a pool and temporary objects it refers to (callable from C)
|
||||
{
|
||||
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame));
|
||||
|
||||
fprintf(stderr, "%s\n", __func__);
|
||||
/* note: this fn is nearly identical in all terms */
|
||||
if (!w->pseudo_window_p)
|
||||
{
|
||||
@ -1266,6 +1267,7 @@ Free a pool and temporary objects it refers to (callable from C)
|
||||
wr.origin.y += FRAME_PIXEL_HEIGHT (f) - pixelheight;
|
||||
|
||||
[view setRows: rows andColumns: cols];
|
||||
fprintf(stderr, "%s %d %d\n", __func__, cols, (int)wr.origin.x);
|
||||
[window setFrame: wr display: YES];
|
||||
|
||||
/*fprintf (stderr, "\tx_set_window_size %d, %d\t%d, %d\n", cols, rows, pixelwidth, pixelheight); */
|
||||
@ -1283,6 +1285,7 @@ Free a pool and temporary objects it refers to (callable from C)
|
||||
- NS_SCROLL_BAR_WIDTH (f), 0)
|
||||
: NSMakePoint (0, 0);
|
||||
[view setFrame: NSMakeRect (0, 0, pixelwidth, pixelheight)];
|
||||
fprintf(stderr, "%s origin %d\n", __func__, (int)origin.x);
|
||||
[view setBoundsOrigin: origin];
|
||||
}
|
||||
|
||||
@ -2297,12 +2300,20 @@ Free a pool and temporary objects it refers to (callable from C)
|
||||
[ns_lookup_indexed_color(face->background, f) set];
|
||||
NSRectFill (r);
|
||||
[img setXBMColor: ns_lookup_indexed_color(face->foreground, f)];
|
||||
#if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
|
||||
[img drawInRect: r
|
||||
fromRect: NSZeroRect
|
||||
operation: NSCompositeSourceOver
|
||||
fraction: 1.0
|
||||
respectFlipped: YES
|
||||
hints: nil];
|
||||
#else
|
||||
{
|
||||
NSPoint pt = r.origin;
|
||||
pt.y += p->h;
|
||||
[img compositeToPoint: pt operation: NSCompositeSourceOver];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
ns_unfocus (f);
|
||||
}
|
||||
@ -2961,12 +2972,19 @@ Function modeled after x_draw_glyph_string_box ().
|
||||
|
||||
/* Draw the image.. do we need to draw placeholder if img ==nil? */
|
||||
if (img != nil)
|
||||
{
|
||||
#if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
|
||||
[img drawInRect: br
|
||||
fromRect: NSZeroRect
|
||||
fromRect: NSZeroRect
|
||||
operation: NSCompositeSourceOver
|
||||
fraction: 1.0
|
||||
respectFlipped: YES
|
||||
hints: nil];
|
||||
#else
|
||||
[img compositeToPoint: NSMakePoint (x, y + s->slice.height)
|
||||
operation: NSCompositeSourceOver];
|
||||
#endif
|
||||
}
|
||||
|
||||
if (s->hl == DRAW_CURSOR)
|
||||
{
|
||||
@ -5380,6 +5398,7 @@ - (void) updateFrameSize
|
||||
change_frame_size (emacsframe, rows, cols, 0, 0, 1);
|
||||
SET_FRAME_GARBAGED (emacsframe);
|
||||
cancel_mouse_face (emacsframe);
|
||||
fprintf(stderr, "%s %d %d\n", __func__, cols, neww);
|
||||
[view setFrame: NSMakeRect (0, 0, neww, newh)];
|
||||
}
|
||||
}
|
||||
@ -6196,8 +6215,20 @@ - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen
|
||||
NSTRACE (constrainFrameRect);
|
||||
|
||||
if (nr_screens == 1)
|
||||
return [super constrainFrameRect:frameRect toScreen:screen];
|
||||
|
||||
{
|
||||
NSRect r = [super constrainFrameRect:frameRect toScreen:screen];
|
||||
fprintf(stderr, "%s %d/%d %d/%d => %d/%d %d/%d\n", __func__,
|
||||
(int)frameRect.origin.x,
|
||||
(int)frameRect.origin.y,
|
||||
(int)frameRect.size.width,
|
||||
(int)frameRect.size.height,
|
||||
(int)r.origin.x,
|
||||
(int)r.origin.y,
|
||||
(int)r.size.width,
|
||||
(int)r.size.height);
|
||||
return r;
|
||||
}
|
||||
|
||||
if (f->output_data.ns->dont_constrain
|
||||
|| ns_menu_bar_should_be_hidden ())
|
||||
return frameRect;
|
||||
|
Loading…
Reference in New Issue
Block a user