summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2015-07-20 11:09:48 +0000
committerManolo Gouy <Manolo>2015-07-20 11:09:48 +0000
commit696231e512283f58bfa9c5b3fea0d62b7a52fde7 (patch)
tree42bab45c7add2546f7a6605dc13b838515db3b9d /src
parentad4d5ba5b5618138c25a4c06a7b7313c02b80c91 (diff)
Prepare for Mac OS 10.11 'El Capitan':
- avoid double redraw after window deminiaturization - make sure that a new window appears on screen during the Fl_X::make() call git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10801 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_cocoa.mm7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index c1cc3fd31..a44b081b5 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -1349,7 +1349,7 @@ static FLWindowDelegate *flwindowdelegate_instance = nil;
Fl::handle(FL_SHOW, window);
update_e_xy_and_e_xy_root(nsw);
Fl_X::i(window)->wait_for_expose = 0; // necessary when window was created miniaturized
- Fl::flush(); // process redraws set by FL_SHOW
+ if (fl_mac_os_version < 101100) Fl::flush(); // process redraws set by FL_SHOW
fl_unlock_function();
}
- (void)windowWillMiniaturize:(NSNotification *)notif
@@ -3039,7 +3039,10 @@ void Fl_X::make(Fl_Window* w)
x->changed_resolution(false);
#endif
[cw makeKeyAndOrderFront:nil];
- [cw displayIfNeeded]; // make sure the window is drawn (useful with 10.11)
+ if (fl_mac_os_version >= 101100) { // these two messages seem necessary to make the window appear on screen
+ [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:nil inMode:NSDefaultRunLoopMode dequeue:NO];
+ [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:nil inMode:NSDefaultRunLoopMode dequeue:NO];
+ }
}
if (!w->parent()) {