Fix error in termination of loop

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17988 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2003-10-28 11:05:27 +00:00
parent 5b5d4c307d
commit 62678e6c51
2 changed files with 12 additions and 2 deletions

View file

@ -2,6 +2,10 @@
* Source/GSServicesManager.m: Tidy last patch to match use of
whitespace etc in GNUstep code.
* Source/GSDisplayManager.m:
(-getEventMatchingMask:beforeDate:inMode:dequeue:) fix incorrect
termination ... should terminate when limit date has passed,
irrespective of the state of any input sources.
2003-10-26 15:18 Alexander Malmberg <alexander@malmberg.org>
Matt Rice <ratmice@yahoo.com>

View file

@ -903,9 +903,15 @@ GSCurrentServer(void)
return AUTORELEASE(event);
}
if (loop == nil)
loop = [NSRunLoop currentRunLoop];
{
loop = [NSRunLoop currentRunLoop];
}
if ([loop runMode: mode beforeDate: limit] == NO)
{
break; // Nothing we can do ... no input handlers.
}
}
while ([loop runMode: mode beforeDate: limit] == YES);
while ([limit timeIntervalSinceNow] > 0.0);
return nil; /* No events in specified time */
}