aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil Hodgson <nyamatongwe@gmail.com>2015-02-26 17:50:24 +1100
committerNeil Hodgson <nyamatongwe@gmail.com>2015-02-26 17:50:24 +1100
commitf8a8fe4aa79d96046fc08cf1dafc1cdef274f4bb (patch)
tree31b2526372691a5dfd886815512fc710ebdea887
parenta83e7111c7b05483114bee158799601e7e7c5131 (diff)
downloadscintilla-mirror-f8a8fe4aa79d96046fc08cf1dafc1cdef274f4bb.tar.gz
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.
-rw-r--r--cocoa/PlatCocoa.mm8
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)