backport from trunk

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75778 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2014-02-03 17:44:10 +00:00
parent 59f3c91d37
commit d1206a3f88

View File

@@ -202,19 +202,18 @@ int wxGUIEventLoop::DoDispatchTimeout(unsigned long timeout)
{
if ( [[NSApplication sharedApplication]
nextEventMatchingMask: NSAnyEventMask
untilDate: nil
untilDate: [NSDate dateWithTimeIntervalSinceNow: timeout/1000.0]
inMode: NSDefaultRunLoopMode
dequeue: NO] != nil )
return 1;
return -1;
}
case NSRunStoppedResponse:
case NSRunAbortedResponse:
return -1;
default:
wxFAIL_MSG("unknown response code");
// nested native loops may return other codes here, just ignore them
break;
}
return -1;
@@ -223,7 +222,7 @@ int wxGUIEventLoop::DoDispatchTimeout(unsigned long timeout)
{
NSEvent *event = [NSApp
nextEventMatchingMask:NSAnyEventMask
untilDate:[NSDate dateWithTimeIntervalSinceNow: timeout/1000]
untilDate:[NSDate dateWithTimeIntervalSinceNow: timeout/1000.0]
inMode:NSDefaultRunLoopMode
dequeue: YES];