summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXDebug.c
diff options
context:
space:
mode:
authordas <das>2007-11-09 06:26:53 (GMT)
committerdas <das>2007-11-09 06:26:53 (GMT)
commit4ac0e907dca3a91aa4e5b3247437464607970fd6 (patch)
tree40938979466c8caac1c03c907753bc43175304bd /macosx/tkMacOSXDebug.c
parent381a9e822cb4198f8afc6c9cbe16a0865746ce7c (diff)
downloadtk-4ac0e907dca3a91aa4e5b3247437464607970fd6.zip
tk-4ac0e907dca3a91aa4e5b3247437464607970fd6.tar.gz
tk-4ac0e907dca3a91aa4e5b3247437464607970fd6.tar.bz2
Backport from HEAD of Aqua changes from 2007-10-12 to 2007-11-09
Diffstat (limited to 'macosx/tkMacOSXDebug.c')
-rw-r--r--macosx/tkMacOSXDebug.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/macosx/tkMacOSXDebug.c b/macosx/tkMacOSXDebug.c
index 88d23f4..ac2bef8 100644
--- a/macosx/tkMacOSXDebug.c
+++ b/macosx/tkMacOSXDebug.c
@@ -54,7 +54,7 @@
* software in accordance with the terms specified in this
* license.
*
- * RCS: @(#) $Id: tkMacOSXDebug.c,v 1.2.2.13 2007/06/29 03:22:01 das Exp $
+ * RCS: @(#) $Id: tkMacOSXDebug.c,v 1.2.2.14 2007/11/09 06:26:55 das Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -62,9 +62,6 @@
#ifdef TK_MAC_DEBUG
-#include <mach-o/dyld.h>
-#include <mach-o/nlist.h>
-
typedef struct {
EventKind kind;
const char * name;
@@ -456,22 +453,35 @@ TkMacOSXMouseTrackingResultToAscii(MouseTrackingResult r, char * buf)
MODULE_SCOPE void
TkMacOSXDebugFlashRegion(
Drawable d,
- RgnHandle rgn)
+ HIShapeRef rgn)
{
TkMacOSXInitNamedDebugSymbol(HIToolbox, int, QDDebugFlashRegion,
CGrafPtr port, RgnHandle region);
- if (d && rgn && QDDebugFlashRegion && !EmptyRgn(rgn)) {
+ CFShow(rgn);
+ if (d && rgn && QDDebugFlashRegion && !HIShapeIsEmpty(rgn)) {
CGrafPtr port = TkMacOSXGetDrawablePort(d);
if (port) {
+ static RgnHandle qdRgn = NULL;
+
+ if (!qdRgn) {
+ qdRgn = NewRgn();
+ }
+ ChkErr(HIShapeGetAsQDRgn, rgn, qdRgn);
+
/*
* Carbon-internal region flashing SPI (c.f. Technote 2124)
*/
- QDDebugFlashRegion(port, rgn);
+ QDDebugFlashRegion(port, qdRgn);
+ SetEmptyRgn(qdRgn);
}
}
}
+#endif /* TK_MAC_DEBUG */
+
+#include <mach-o/dyld.h>
+#include <mach-o/nlist.h>
/*
*----------------------------------------------------------------------
@@ -511,7 +521,7 @@ TkMacOSXGetNamedDebugSymbol(
if (!addr) {
const struct mach_header *mh = NULL;
uint32_t i, n = _dyld_image_count();
- size_t module_len;
+ size_t module_len = 0;
if (module && *module) {
module_len = strlen(module);
@@ -606,5 +616,3 @@ TkMacOSXGetNamedDebugSymbol(
#endif /* __LP64__ */
return addr;
}
-
-#endif /* TK_MAC_DEBUG */