diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index 68c6ac59f4..51eda933a6 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -1924,6 +1924,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;