From f8a8fe4aa79d96046fc08cf1dafc1cdef274f4bb Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Thu, 26 Feb 2015 17:50:24 +1100 Subject: Fix bug where autocompletion and call-ups were placed on the wrong screen due to some code using the screen of the window and other code using the main screen. --- cocoa/PlatCocoa.mm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'cocoa') 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) -- cgit v1.2.3