summaryrefslogtreecommitdiff
path: root/src/Fl_Native_File_Chooser_MAC.mm
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2011-10-22 15:12:57 +0000
committerManolo Gouy <Manolo>2011-10-22 15:12:57 +0000
commit81fcaed45669ec06a7302b427eacbd550b2ee7b2 (patch)
tree23207657e89008c8faba69585dda55feebb9f42a /src/Fl_Native_File_Chooser_MAC.mm
parentbabac0847488e0c63c5c496af92f988f7aadaf00 (diff)
Mac OS: the procedure used to restore visible focus to a window after using an Fl_Native_File_Chooser
window failed under OS X 10.7. It's replaced by a simpler, OS version-independent procedure. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9144 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Native_File_Chooser_MAC.mm')
-rw-r--r--src/Fl_Native_File_Chooser_MAC.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Fl_Native_File_Chooser_MAC.mm b/src/Fl_Native_File_Chooser_MAC.mm
index 2aa48c2bf..764e4261c 100644
--- a/src/Fl_Native_File_Chooser_MAC.mm
+++ b/src/Fl_Native_File_Chooser_MAC.mm
@@ -532,6 +532,7 @@ int Fl_Native_File_Chooser::post() {
}
// SHOW THE DIALOG
+ NSWindow *key = [NSApp keyWindow];
if ( [(NSSavePanel*)_panel isKindOfClass:[NSOpenPanel class]] ) {
NSPopUpButton *popup = nil;
if (_filt_total) {
@@ -609,6 +610,7 @@ int Fl_Native_File_Chooser::post() {
[preset release];
if ( retval == NSOKButton ) get_saveas_basename();
}
+ [key makeKeyWindow];
[localPool release];
return (retval == NSOKButton ? 0 : 1);
}