diff options
| -rw-r--r-- | cocoa/PlatCocoa.mm | 2 | 
1 files changed, 2 insertions, 0 deletions
| diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 304798cbb..28c0f8107 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -1121,6 +1121,8 @@ bool Window::HasFocus()  static int ScreenMax(NSWindow* win)  {    NSScreen* screen = [win screen]; +  if (!screen) +    screen = [NSScreen mainScreen];    NSRect frame = [screen frame];    return frame.origin.y + frame.size.height;  } | 
