diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index c50f6645b0..1b34519f7e 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -1929,6 +1929,7 @@ static void Cocoa_SendMouseButtonClicks(SDL_Mouse *mouse, NSEvent *theEvent, SDL //if ([_data.listener isInFullscreenSpace]) { int posx = 0, posy = 0; SDL_GetWindowPosition(window, &posx, &posy); + SDL_RelativeToGlobalForWindow(window, posx, posy, &posx, &posy); SDL_GetGlobalMouseState(&x, &y); x -= posx; y -= posy;