From 61e62f5f738f8a195c11daf061ba165f9adf2d0b Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sat, 8 Oct 2005 02:29:25 +0000 Subject: [PATCH] (x_create_gc, x_free_gc) [MAC_OS]: Add BLOCK_INPUT. Add debug code. --- src/ChangeLog | 36 ++++++++++++++++++++++++++++++++++++ src/xfaces.c | 6 ++++++ 2 files changed, 42 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 74244702feb..d466f5d3bf2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,39 @@ +2005-10-08 YAMAMOTO Mitsuharu + + * macgui.h (MAX_CLIP_RECTS): New define. + (struct _XGC): New member clip_region. + (struct _XGC) [MAC_OSX && USE_ATSUI]: New members n_clip_rects and + clip_rects. + + * macterm.c (GC_CLIP_REGION): New macro. + (saved_port_clip_region): New variable. + (mac_begin_clip, mac_end_clip): New functions. + (XDrawLine, mac_erase_rectangle, mac_draw_bitmap, XFillRectangle) + (mac_draw_rectangle, mac_draw_string_common, mac_copy_area) + (mac_copy_area_with_mask, mac_scroll_area): Use them. + (mac_set_clip_rectangle, mac_reset_clipping): Remove functions. + [USE_ATSUI] (atsu_get_text_layout_with_text_ptr) + [MAC_OS_X_VERSION_MAX_ALLOWED < 1020]: Specify kATSLineFractDisable. + (mac_draw_string_common) [MAC_OSX && USE_ATSUI]: Clip to clipping + rectangles stored in gc. + (XFreeGC): Dispose clipping region. + (mac_set_clip_rectangles, mac_reset_clip_rectangles): New functions. + (x_draw_fringe_bitmap, x_set_glyph_string_clipping) + (x_draw_relief_rect, x_draw_box_rect, x_draw_stretch_glyph_string) + (x_draw_glyph_string, x_clip_to_row, x_draw_hollow_cursor) + (x_draw_bar_cursor): Use them. + (x_set_glyph_string_clipping): Use get_glyph_string_clip_rects to + get multiple clipping rectangles. + + * macterm.h (mac_term_init): Add types to extern. + (struct mac_output): Remove members mWP and pending_menu_activation. + Put members scroll_bar_foreground_pixel and + scroll_bar_background_pixel in #if 0. + (FRAME_MAC_WINDOW, FRAME_X_WINDOW): Use window_desc. + + * xfaces.c (x_create_gc, x_free_gc) [MAC_OS]: Add BLOCK_INPUT. + Add debug code. + 2005-10-08 Kim F. Storm * window.c (window_tree, Fwindow_tree): Rename fns added 2005-10-04. diff --git a/src/xfaces.c b/src/xfaces.c index 49ba6d334ec..f13fdf74909 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -790,7 +790,10 @@ x_create_gc (f, mask, xgcv) XGCValues *xgcv; { GC gc; + BLOCK_INPUT; gc = XCreateGC (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), mask, xgcv); + UNBLOCK_INPUT; + IF_DEBUG (++ngcs); return gc; } @@ -799,7 +802,10 @@ x_free_gc (f, gc) struct frame *f; GC gc; { + BLOCK_INPUT; + IF_DEBUG (xassert (--ngcs >= 0)); XFreeGC (FRAME_MAC_DISPLAY (f), gc); + UNBLOCK_INPUT; } #endif /* MAC_OS */ -- 2.39.2