diff options
-rw-r--r-- | cocoa/PlatCocoa.mm | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 711b91e42..1379b661d 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -1122,13 +1122,11 @@ bool Window::HasFocus() static CGFloat ScreenMax(NSWindow* win) { - NSScreen* screen = [win screen]; - if (!screen) - screen = [NSScreen mainScreen]; - NSRect frame = [screen frame]; - return frame.origin.y + frame.size.height; + return NSMaxY([[NSScreen mainScreen] frame]); } +//-------------------------------------------------------------------------------------------------- + PRectangle Window::GetPosition() { if (wid) |