aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil Hodgson <nyamatongwe@gmail.com>2015-09-29 16:23:11 +1000
committerNeil Hodgson <nyamatongwe@gmail.com>2015-09-29 16:23:11 +1000
commit8a45978202a01828a7e0b3240c101d8949a7064e (patch)
tree68f1fd33f3db14f914580dadb4b32f25613896ad
parent247442c9392d8626217c3c670d9b2ced7f8378f6 (diff)
downloadscintilla-mirror-8a45978202a01828a7e0b3240c101d8949a7064e.tar.gz
ScreenMax no longer depends on window so do not pass as argument.
-rw-r--r--cocoa/PlatCocoa.mm6
1 files changed, 3 insertions, 3 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm
index ebf35d210..5776818ad 100644
--- a/cocoa/PlatCocoa.mm
+++ b/cocoa/PlatCocoa.mm
@@ -1118,7 +1118,7 @@ bool Window::HasFocus()
//--------------------------------------------------------------------------------------------------
-static CGFloat ScreenMax(NSWindow* win)
+static CGFloat ScreenMax()
{
return NSMaxY([[NSScreen mainScreen] frame]);
}
@@ -1146,7 +1146,7 @@ PRectangle Window::GetPosition()
win = reinterpret_cast<NSWindow*>(idWin);
rect = [win frame];
}
- CGFloat screenHeight = ScreenMax(win);
+ CGFloat screenHeight = ScreenMax();
// Invert screen positions to match Scintilla
return PRectangle(
static_cast<XYPOSITION>(NSMinX(rect)), static_cast<XYPOSITION>(screenHeight - NSMaxY(rect)),
@@ -1179,7 +1179,7 @@ void Window::SetPosition(PRectangle rc)
// NSWindow
PLATFORM_ASSERT([idWin isKindOfClass: [NSWindow class]]);
NSWindow* win = reinterpret_cast<NSWindow*>(idWin);
- CGFloat screenHeight = ScreenMax(win);
+ CGFloat screenHeight = ScreenMax();
NSRect nsrc = NSMakeRect(rc.left, screenHeight - rc.bottom,
rc.Width(), rc.Height());
[win setFrame: nsrc display:YES];