mirror of
https://github.com/fltk/fltk.git
synced 2026-06-02 07:26:57 +08:00
Applied patch from dec 10th. It does not solve the problem that the About dialog drops behind the Sudoku window though...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6964 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -659,6 +659,19 @@ static double do_queued_events( double time = 0.0 )
|
||||
}
|
||||
}
|
||||
}
|
||||
//necessary so that after closing a non-FLTK window (e.g., Fl_Native_File_Chooser)
|
||||
//the front window turns key again
|
||||
if([NSApp keyWindow] == nil) {
|
||||
Fl_Window *w = Fl::first_window();
|
||||
if (w) {
|
||||
NSWindow *cw = (NSWindow*)Fl_X::i(w)->xid;
|
||||
if([cw isVisible] && ![cw isMiniaturized] && ([cw styleMask] & NSTitledWindowMask) ) {
|
||||
if(![cw isKeyWindow]) {//always make Fl::first_window() the key window
|
||||
[cw makeKeyWindow];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
NSEvent *event = [NSApp nextEventMatchingMask:NSAnyEventMask
|
||||
untilDate:[NSDate dateWithTimeIntervalSinceNow:time]
|
||||
inMode:NSDefaultRunLoopMode dequeue:YES];
|
||||
|
||||
Reference in New Issue
Block a user