Below is the patch of the first trial that I finally rejected myself, against the previous version (emacs-24.3-mac-4.0) of the Mac port. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp === modified file 'src/macappkit.h' *** src/macappkit.h 2013-03-19 06:08:36 +0000 --- src/macappkit.h 2013-04-03 00:24:59 +0000 *************** *** 807,812 **** --- 807,816 ---- @end #endif + @interface NSWindow (Undocumented) + - (void)_maskRoundedBottomCorners:(NSRect)clipRect; + @end + #if MAC_OS_X_VERSION_MAX_ALLOWED < 1060 @interface NSMenu (AvailableOn1060AndLater) - (BOOL)popUpMenuPositioningItem:(NSMenuItem *)item === modified file 'src/macappkit.m' *** src/macappkit.m 2013-04-03 00:08:55 +0000 --- src/macappkit.m 2013-04-03 00:24:59 +0000 *************** *** 3610,3615 **** --- 3610,3616 ---- unset_global_focus_view_frame (); [frameController unlockFocusOnEmacsView]; + mac_mask_rounded_bottom_corners (f); [window enableFlushWindow]; } *************** *** 3715,3720 **** --- 3716,3736 ---- [frameController invalidateCursorRectsForEmacsView]; } + void + mac_mask_rounded_bottom_corners (struct frame *f) + { + NSWindow *window = FRAME_MAC_WINDOW_OBJECT (f); + + if ([window respondsToSelector:@selector(_maskRoundedBottomCorners:)]) + { + NSView *contentView = [window contentView]; + NSRect rect = [contentView visibleRect]; + + rect = [contentView convertRect:rect toView:nil]; + [window _maskRoundedBottomCorners:rect]; + } + } + /************************************************************************ View and Drawing === modified file 'src/macterm.c' *** src/macterm.c 2013-01-12 05:16:32 +0000 --- src/macterm.c 2013-04-03 00:24:59 +0000 *************** *** 2836,2841 **** --- 2836,2842 ---- block_input (); mac_invert_rectangles (f, rects, nrects); + mac_mask_rounded_bottom_corners (f); x_flush (f); *************** *** 2863,2868 **** --- 2864,2870 ---- } mac_invert_rectangles (f, rects, nrects); + mac_mask_rounded_bottom_corners (f); x_flush (f); === modified file 'src/macterm.h' *** src/macterm.h 2013-03-18 02:33:51 +0000 --- src/macterm.h 2013-04-03 00:24:59 +0000 *************** *** 651,656 **** --- 651,657 ---- extern int mac_tracking_area_works_with_cursor_rects_invalidation_p (void); extern void mac_invalidate_frame_cursor_rects (struct frame *f); + extern void mac_mask_rounded_bottom_corners (struct frame *); extern int mac_webkit_supports_svg_p (void); extern CFTypeRef mac_sound_create (Lisp_Object, Lisp_Object);