summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXInit.c
diff options
context:
space:
mode:
authorculler <culler>2018-10-24 16:43:45 (GMT)
committerculler <culler>2018-10-24 16:43:45 (GMT)
commitddb5db1e6f025f1852420243feca27d491051596 (patch)
treea0c5b5817f3c55cb1e47f4e6d8ed4f33f510c1e5 /macosx/tkMacOSXInit.c
parent6327579716bd47191431b8c778cfca0552a198c8 (diff)
downloadtk-ddb5db1e6f025f1852420243feca27d491051596.zip
tk-ddb5db1e6f025f1852420243feca27d491051596.tar.gz
tk-ddb5db1e6f025f1852420243feca27d491051596.tar.bz2
Added a boolean state variable so a displayProc can check if it is being run by drawRect.
Diffstat (limited to 'macosx/tkMacOSXInit.c')
-rw-r--r--macosx/tkMacOSXInit.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c
index c12c394..b85b66d 100644
--- a/macosx/tkMacOSXInit.c
+++ b/macosx/tkMacOSXInit.c
@@ -16,7 +16,6 @@
#include "tkMacOSXPrivate.h"
#include <sys/stat.h>
-#include <sys/utsname.h>
#include <dlfcn.h>
#include <objc/objc-auto.h>
@@ -29,8 +28,6 @@ static char tkLibPath[PATH_MAX + 1] = "";
static char scriptPath[PATH_MAX + 1] = "";
-long tkMacOSXMacOSXVersion = 0;
-
#pragma mark TKApplication(TKInit)
@interface TKApplication(TKKeyboard)
@@ -48,6 +45,8 @@ long tkMacOSXMacOSXVersion = 0;
@implementation TKApplication
@synthesize poolLock = _poolLock;
+@synthesize macMinorVersion = _macMinorVersion;
+@synthesize isDrawing = _isDrawing;
@end
/*
@@ -164,7 +163,13 @@ long tkMacOSXMacOSXVersion = 0;
minorVersion = systemVersion.minorVersion;
#endif
[NSApp setMacMinorVersion: minorVersion];
-
+
+ /*
+ * We are not drawing yet.
+ */
+
+ [NSApp setIsDrawing: NO];
+
/*
* Be our own delegate.
*/
@@ -268,7 +273,6 @@ TkpInit(
*/
if (!initialized) {
- struct utsname name;
struct stat st;
initialized = 1;
@@ -281,20 +285,6 @@ TkpInit(
# error Mac OS X 10.6 required
#endif
- if (!uname(&name)) {
- tkMacOSXMacOSXVersion = (strtod(name.release, NULL) + 96) * 10;
- }
- /*Check for new versioning scheme on Yosemite (10.10) and later.*/
- if (MAC_OS_X_VERSION_MIN_REQUIRED > 100000) {
- tkMacOSXMacOSXVersion = MAC_OS_X_VERSION_MIN_REQUIRED/100;
- }
- if (tkMacOSXMacOSXVersion && MAC_OS_X_VERSION_MIN_REQUIRED < 100000 &&
- tkMacOSXMacOSXVersion/10 < MAC_OS_X_VERSION_MIN_REQUIRED/10) {
- Tcl_Panic("Mac OS X 10.%d or later required !",
- (MAC_OS_X_VERSION_MIN_REQUIRED/10)-100);
- }
-
-
#ifdef TK_FRAMEWORK
/*
* When Tk is in a framework, force tcl_findLibrary to look in the