| 926 | } |
| 927 | |
| 928 | void MacWindow::Hide() |
| 929 | { |
| 930 | if (_visible) |
| 931 | { |
| 932 | SetCursor(CursorType::Default); |
| 933 | |
| 934 | // Hide (order out doesn't work for miniaturized windows) |
| 935 | NSWindow* window = (NSWindow*)_window; |
| 936 | const BOOL wasKey = [window isKeyWindow]; |
| 937 | if ([window isMiniaturized]) |
| 938 | [window close]; |
| 939 | else |
| 940 | [window orderOut:nil]; |
| 941 | |
| 942 | // Transfer focus back to the parent when hiding popup |
| 943 | if (_settings.Parent && wasKey) |
| 944 | { |
| 945 | NSWindow* parent = (NSWindow*)_settings.Parent->GetNativePtr(); |
| 946 | [parent makeKeyAndOrderFront:nil]; |
| 947 | } |
| 948 | |
| 949 | // Base |
| 950 | WindowBase::Hide(); |
| 951 | } |
| 952 | } |
| 953 | |
| 954 | void MacWindow::Minimize() |
| 955 | { |
nothing calls this directly
no test coverage detected