Skip to content

Commit

Permalink
Mac: Correct the y-axis position after 870c7d21004b
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jorgenpt committed Apr 25, 2014
1 parent dfea14d commit 8b28009
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/cocoa/SDL_cocoawindow.m
Expand Up @@ -92,7 +92,7 @@ - (void)sendEvent:(NSEvent *)event
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
Expand Down

0 comments on commit 8b28009

Please sign in to comment.