mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-15 14:26:01 +00:00
cocoa: Fix mousegrab when going fullscreen.
When going into a fullscreen space, update mouseConfinementRect once the transition is done. When going exclusive fullscreen, force a window sync so the transition is complete before we do the update. Fixes #9088.
This commit is contained in:
@@ -1377,6 +1377,8 @@ static NSCursor *Cocoa_GetDesiredCursor(void)
|
||||
window->h = 0;
|
||||
[self windowDidMove:aNotification];
|
||||
[self windowDidResize:aNotification];
|
||||
|
||||
Cocoa_UpdateClipCursor(window);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1516,6 +1518,8 @@ static NSCursor *Cocoa_GetDesiredCursor(void)
|
||||
if (!(window->flags & SDL_WINDOW_HIDDEN)) {
|
||||
Cocoa_ShowWindow(SDL_GetVideoDevice(), window);
|
||||
}
|
||||
|
||||
Cocoa_UpdateClipCursor(window);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2935,6 +2939,8 @@ SDL_FullscreenResult Cocoa_SetWindowFullscreen(SDL_VideoDevice *_this, SDL_Windo
|
||||
}
|
||||
|
||||
ScheduleContextUpdates(data);
|
||||
Cocoa_SyncWindow(_this, window);
|
||||
Cocoa_UpdateClipCursor(window);
|
||||
}
|
||||
|
||||
return SDL_FULLSCREEN_SUCCEEDED;
|
||||
|
Reference in New Issue
Block a user