From c5fd555cd581462977c9ae2ef58ebae71397dfbb Mon Sep 17 00:00:00 2001 From: CaS Date: Tue, 28 Oct 2003 11:05:27 +0000 Subject: [PATCH] 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 --- ChangeLog | 4 ++++ Source/GSDisplayServer.m | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 53c1b48cf..998d3a93d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 Matt Rice diff --git a/Source/GSDisplayServer.m b/Source/GSDisplayServer.m index 211523d00..2b9f2b40e 100644 --- a/Source/GSDisplayServer.m +++ b/Source/GSDisplayServer.m @@ -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 */ }