summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXTest.c
diff options
context:
space:
mode:
authorculler <culler>2018-11-05 16:03:56 (GMT)
committerculler <culler>2018-11-05 16:03:56 (GMT)
commit31f82fb5b5ae52d1893a87e7a5a83c0e9eae2f58 (patch)
tree55a223472c4e168f0c0b29d3aa178a70c75b629f /macosx/tkMacOSXTest.c
parentb236ac696bc5e78bb9aa87505d01d388b1b8cb07 (diff)
downloadtk-31f82fb5b5ae52d1893a87e7a5a83c0e9eae2f58.zip
tk-31f82fb5b5ae52d1893a87e7a5a83c0e9eae2f58.tar.gz
tk-31f82fb5b5ae52d1893a87e7a5a83c0e9eae2f58.tar.bz2
Make XSync, and hence update, be synchronous so test results are consistent. Fix duplicate
reports of calls to the test image displayProc.
Diffstat (limited to 'macosx/tkMacOSXTest.c')
-rw-r--r--macosx/tkMacOSXTest.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/macosx/tkMacOSXTest.c b/macosx/tkMacOSXTest.c
index 1882ce6..92c925c 100644
--- a/macosx/tkMacOSXTest.c
+++ b/macosx/tkMacOSXTest.c
@@ -80,6 +80,32 @@ DebuggerObjCmd(
}
/*
+ *----------------------------------------------------------------------
+ *
+ * TkTestAppIsDrawing --
+ *
+ * A widget display procedure can call this to determine whether it
+ * is being run inside of the drawRect method. This is needed for
+ * some tests, especially of the Text widget, which record data in
+ * a global Tcl variable and assume that display procedures will be
+ * run in a predictable sequence as Tcl idle tasks.
+ *
+ * Results:
+ * True only while running the drawRect method of a TKContentView;
+ *
+ * Side effects:
+ * None
+ *
+ *----------------------------------------------------------------------
+ */
+MODULE_SCOPE Bool
+TkTestAppIsDrawing(void) {
+ return [NSApp isDrawing];
+}
+
+
+
+/*
* Local Variables:
* mode: objc
* c-basic-offset: 4