From 86f23314c334101a25c5e0e67be6b68cf5badb1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Thu, 24 Apr 2014 21:05:51 -0700 Subject: [PATCH] Mac: Correct the y-axis position after 94af945dbb57 This fixes a bug where we'd offset positions by the height of the dock, if it was along the bottom of the screen. Fixes https://bugzilla.libsdl.org/show_bug.cgi?id=2509 Thanks to Alex Szpakowski for bug & patch. --- src/video/cocoa/SDL_cocoawindow.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index f2b2dd64d..ba3059789 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -92,7 +92,7 @@ static Uint32 s_moveHack; static void ConvertNSRect(NSScreen *screen, NSRect *r) { NSRect visibleScreen = [screen visibleFrame]; - r->origin.y = visibleScreen.size.height - r->origin.y - r->size.height; + r->origin.y = (visibleScreen.origin.y + visibleScreen.size.height) - r->origin.y - r->size.height; } static void