diff options
| author | Manolo Gouy <Manolo> | 2017-10-11 15:19:45 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2017-10-11 15:19:45 +0000 |
| commit | 193c611fc2e482b3ae9e2d2d4518ce88eb399d49 (patch) | |
| tree | 5fd075b7b020b67805ea8cbbfea5b786da2b184e /src | |
| parent | 2eeff9d310816b571b2899838ac734181952b034 (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_cocoa.mm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 3b3a9a466..32193655e 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -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]; + } } /* |
