aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-11-29 12:38:46 +0100
committerSven Gothel <[email protected]>2011-11-29 12:38:46 +0100
commitdaf11ad8174a1b4471eaa0b59c8350b4175baae2 (patch)
treee5e808ee555b9270bfe7a39f7e2d640d9cbca484 /src
parent6b3fae9aebdafd8ed605543272d7d9cbf2f8c5dd (diff)
NEWT MacWindow: the softLock (pthread mutex) is now always blocking (remove non blocking code)
Diffstat (limited to 'src')
-rw-r--r--src/newt/native/NewtMacWindow.m18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/newt/native/NewtMacWindow.m b/src/newt/native/NewtMacWindow.m
index a3b6fa871..7c59aebc9 100644
--- a/src/newt/native/NewtMacWindow.m
+++ b/src/newt/native/NewtMacWindow.m
@@ -193,49 +193,31 @@ static jmethodID windowRepaintID = NULL;
return destroyNotifySent;
}
-#define SOFT_LOCK_BLOCKING 1
-
- (BOOL) softLock
{
pthread_mutex_lock(&softLockSync);
softLocked = YES;
-#ifndef SOFT_LOCK_BLOCKING
- pthread_mutex_unlock(&softLockSync);
-#endif
return softLocked;
}
- (void) softUnlock
{
-#ifndef SOFT_LOCK_BLOCKING
- pthread_mutex_lock(&softLockSync);
-#endif
softLocked = NO;
pthread_mutex_unlock(&softLockSync);
}
- (BOOL) needsDisplay
{
-#ifndef SOFT_LOCK_BLOCKING
- return NO == softLocked && NO == destroyNotifySent && [super needsDisplay];
-#else
return NO == destroyNotifySent && [super needsDisplay];
-#endif
}
- (void) displayIfNeeded
{
-#ifndef SOFT_LOCK_BLOCKING
- if( NO == softLocked && NO == destroyNotifySent ) {
- [super displayIfNeeded];
- }
-#else
[self softLock];
if( NO == destroyNotifySent ) {
[super displayIfNeeded];
}
[self softUnlock];
-#endif
}
- (void) viewWillDraw