From 8a45978202a01828a7e0b3240c101d8949a7064e Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Tue, 29 Sep 2015 16:23:11 +1000 Subject: ScreenMax no longer depends on window so do not pass as argument. --- cocoa/PlatCocoa.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cocoa') 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(idWin); rect = [win frame]; } - CGFloat screenHeight = ScreenMax(win); + CGFloat screenHeight = ScreenMax(); // Invert screen positions to match Scintilla return PRectangle( static_cast(NSMinX(rect)), static_cast(screenHeight - NSMaxY(rect)), @@ -1179,7 +1179,7 @@ void Window::SetPosition(PRectangle rc) // NSWindow PLATFORM_ASSERT([idWin isKindOfClass: [NSWindow class]]); NSWindow* win = reinterpret_cast(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]; -- cgit v1.2.3