mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-09-01 19:33:38 +00:00
cocoa: Convert popup window coordinates to global when adjusting the pointer offset
Fixes a regression in958c4cbf0d(cherry picked from commit013844b003)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user