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
commitfa52361dc96d4037898ba704e13be1461540c948 (patch)
tree0eb2697e8f3ea7879cee941be854e58cb3dfc2d0
parentfe3a578229d51a8e277c879e75b02dd676ad0999 (diff)
downloadscintilla-mirror-fa52361dc96d4037898ba704e13be1461540c948.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)