From daf11ad8174a1b4471eaa0b59c8350b4175baae2 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 29 Nov 2011 12:38:46 +0100 Subject: NEWT MacWindow: the softLock (pthread mutex) is now always blocking (remove non blocking code) --- src/newt/native/NewtMacWindow.m | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'src/newt/native/NewtMacWindow.m') 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 -- cgit v1.2.3