From 751c731c08e646e929d3f4392a4cee26d8486437 Mon Sep 17 00:00:00 2001 From: rfm Date: Thu, 15 Jan 2009 15:19:19 +0000 Subject: [PATCH] Make NSAnimation work a bit git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27604 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Source/NSRunLoop.m | 18 +++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 16d6a6fac..63196d017 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-01-15 Richard Frith-Macdonald + + * Source/NSRunLoop.m: Cleaned up a little and added hack as a temporary + fix for #25327, though I'm suspecting that the actual problme is in the + NSAnimation code. + 2009-01-15 Richard Frith-Macdonald * Source/NSRunLoop.m: diff --git a/Source/NSRunLoop.m b/Source/NSRunLoop.m index 97f38c412..96b7963a9 100644 --- a/Source/NSRunLoop.m +++ b/Source/NSRunLoop.m @@ -1109,9 +1109,6 @@ static inline BOOL timerInvalidated(NSTimer *t) NS_DURING { - GSIArray watchers; - unsigned i; - /* * If we have a housekeeping timer, and it is earlier than the * limit date we have been given, we use the date of the housekeeper @@ -1124,8 +1121,7 @@ static inline BOOL timerInvalidated(NSTimer *t) limit_date = timerDate(context->housekeeper); } - if ((context == nil || (watchers = context->watchers) == 0 - || (i = GSIArrayCount(watchers)) == 0)) + if (context == nil || GSIArrayCount(context->watchers) == 0) { NSDebugMLLog(@"NSRunLoop", @"no inputs in mode %@", mode); GSPrivateNotifyASAP(); @@ -1216,6 +1212,7 @@ static inline BOOL timerInvalidated(NSTimer *t) - (BOOL) runMode: (NSString*)mode beforeDate: (NSDate*)date { CREATE_AUTORELEASE_POOL(arp); + GSRunLoopCtxt *context; NSDate *d; NSAssert(mode != nil, NSInvalidArgumentException); @@ -1236,6 +1233,17 @@ static inline BOOL timerInvalidated(NSTimer *t) return NO; } +#if 0 + /* Check to see if we have any input sources. + */ + context = NSMapGet(_contextMap, mode); + if (context == nil || GSIArrayCount(context->watchers) == 0) + { + RELEASE(arp); + return NO; + } +#endif + /* * Use the earlier of the two dates we have. * Retain the date in case the firing of a timer (or some other event)