diff options
| author | Neil Hodgson <nyamatongwe@gmail.com> | 2015-09-29 16:23:11 +1000 |
|---|---|---|
| committer | Neil Hodgson <nyamatongwe@gmail.com> | 2015-09-29 16:23:11 +1000 |
| commit | cdf88da80d8d4249a8dfefc91c5f8c54c363e921 (patch) | |
| tree | cde18bd969c0481ed7c71fdaab8643cd9832e00c | |
| parent | d880e3f614269ae45daad0b97d6646b9135649a9 (diff) | |
| download | scintilla-mirror-cdf88da80d8d4249a8dfefc91c5f8c54c363e921.tar.gz | |
ScreenMax no longer depends on window so do not pass as argument.
| -rw-r--r-- | cocoa/PlatCocoa.mm | 6 |
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]; |
