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