summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXTest.c
diff options
context:
space:
mode:
authorculler <culler>2020-07-22 03:30:07 (GMT)
committerculler <culler>2020-07-22 03:30:07 (GMT)
commit5297b4a5aa961d555081f871afd899f063b37fcc (patch)
tree809a24f05cc04d4c7be9ed6b0ffd2a38513743a3 /macosx/tkMacOSXTest.c
parentf8b3a93842b3f805b1a470c0673fe2c1048a32b1 (diff)
downloadtk-5297b4a5aa961d555081f871afd899f063b37fcc.zip
tk-5297b4a5aa961d555081f871afd899f063b37fcc.tar.gz
tk-5297b4a5aa961d555081f871afd899f063b37fcc.tar.bz2
Make image testing work better in the Sierras
Diffstat (limited to 'macosx/tkMacOSXTest.c')
-rw-r--r--macosx/tkMacOSXTest.c30
1 files changed, 8 insertions, 22 deletions
diff --git a/macosx/tkMacOSXTest.c b/macosx/tkMacOSXTest.c
index 0a6f4e8..e5dcf5e 100644
--- a/macosx/tkMacOSXTest.c
+++ b/macosx/tkMacOSXTest.c
@@ -136,19 +136,12 @@ MenuBarHeightObjCmd(
* TkTestLogDisplay --
*
* The test image display procedure calls this to determine whether it
- * should write a log message recording that it has being run. On OSX
- * 10.14 and later, only calls to the display procedure which occur inside
- * of the drawRect method should be logged, since those are the only ones
- * which actually draw anything. On earlier systems the opposite is true.
- * The calls from within the drawRect method are redundant, since the
- * first time the display procedure is run it will do the drawing and that
- * first call will usually not occur inside of drawRect.
+ * should write a log message recording that it has being run.
*
* Results:
- * On OSX 10.14 and later, returns true if and only if the NSView of the
- * drawable is the current focusView, which can only be the case when
- * within [NSView drawRect]. On earlier systems returns false if
- * and only if called from with [NSView drawRect].
+ * Returns true if and only if the NSView of the drawable is the
+ * current focusView, which on 10.14 and newer systems can only be the
+ * case when within [NSView drawRect].
*
* Side effects:
* None
@@ -168,18 +161,11 @@ TkTestLogDisplay(
} else if (macWin->winPtr && macWin->winPtr->wmInfoPtr &&
macWin->winPtr->wmInfoPtr->window) {
win = macWin->winPtr->wmInfoPtr->window;
- }/*
- else if (macWin->toplevel && (macWin->toplevel->flags & TK_EMBEDDED)) {
- TkWindow *contWinPtr = TkpGetOtherWindow(macWin->toplevel->winPtr);
- if (contWinPtr) {
- win = TkMacOSXDrawableWindow((Drawable) contWinPtr->privatePtr);
- }
- }*/
- if (win && [NSApp macOSVersion] >= 101400) {
- TKContentView *view = [win contentView];
- return (view == [NSView focusView]);
+ }
+ if (win) {
+ return ([win contentView] == [NSView focusView]);
} else {
- return ![NSApp isDrawing];
+ return True;
}
}