changeset 65912:da86e1af8629

(x_create_gc, x_free_gc) [MAC_OS]: Add BLOCK_INPUT. Add debug code.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Sat, 08 Oct 2005 02:28:55 +0000
parents a86e9a781ba7
children 15b962dcbe76
files src/xfaces.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfaces.c	Sat Oct 08 02:28:37 2005 +0000
+++ b/src/xfaces.c	Sat Oct 08 02:28:55 2005 +0000
@@ -790,7 +790,10 @@
      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 @@
      struct frame *f;
      GC gc;
 {
+  BLOCK_INPUT;
+  IF_DEBUG (xassert (--ngcs >= 0));
   XFreeGC (FRAME_MAC_DISPLAY (f), gc);
+  UNBLOCK_INPUT;
 }
 
 #endif  /* MAC_OS */