Better implementation of Fl_Cocoa_Window_Driver::wait_for_expose() for Mac OS 10.13 High Sierra.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12486 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2017-10-11 15:19:45 +00:00
parent 2eeff9d310
commit 193c611fc2

View File

@ -3084,7 +3084,14 @@ void Fl_Cocoa_Window_Driver::size_range() {
void Fl_Cocoa_Window_Driver::wait_for_expose()
{
[fl_xid(pWindow) recursivelySendToSubwindows:@selector(waitForExpose)];
if (fl_mac_os_version < 101300) {
[fl_xid(pWindow) recursivelySendToSubwindows:@selector(waitForExpose)];
} else {
NSEvent *event = [NSApp nextEventMatchingMask:NSAnyEventMask
untilDate:[NSDate dateWithTimeIntervalSinceNow:0]
inMode:NSDefaultRunLoopMode dequeue:YES];
if (event) [NSApp postEvent:event atStart:NO];
}
}
/*