Track and reset the key window when using the OS X open/save dialog otherwise it will steal focus and not return it.

#codereview michael.trepka

[CL 2104618 by Mark Satterthwaite in Main branch]
This commit is contained in:
Mark Satterthwaite
2014-06-13 11:09:48 -04:00
committed by UnrealBot
parent e24666d7ea
commit 3ef0bac6a7

View File

@@ -472,6 +472,7 @@ bool FDesktopPlatformMac::FileDialogShared(bool bSave, const void* ParentWindowH
[AccessoryView AddAllowedFileTypes:AllowedFileTypes];
bool bSuccess = false;
NSWindow* FocusWindow = [[NSApplication sharedApplication] keyWindow];
{
FScopedSystemModalMode SystemModalScope;
@@ -511,6 +512,11 @@ bool FDesktopPlatformMac::FileDialogShared(bool bSave, const void* ParentWindowH
[Panel close];
MacApplication->ResetModifierKeys();
if(FocusWindow)
{
[FocusWindow makeKeyWindow];
}
return bSuccess;
}