mirror of https://github.com/encounter/SDL.git
When updating grab state, only activate windows that are grabbed, fullscreen, and shown.
Fixes https://github.com/libsdl-org/SDL/issues/5371
This commit is contained in:
parent
e5f45455c9
commit
4e784fce43
|
@ -859,13 +859,10 @@ WIN_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
|
|||
{
|
||||
WIN_UpdateClipCursor(window);
|
||||
|
||||
if (window->flags & SDL_WINDOW_FULLSCREEN) {
|
||||
UINT flags = SWP_NOCOPYBITS | SWP_NOMOVE | SWP_NOSIZE;
|
||||
|
||||
if (!(window->flags & SDL_WINDOW_SHOWN)) {
|
||||
flags |= SWP_NOACTIVATE;
|
||||
}
|
||||
WIN_SetWindowPositionInternal(_this, window, flags);
|
||||
if (grabbed &&
|
||||
(window->flags & SDL_WINDOW_FULLSCREEN) &&
|
||||
(window->flags & SDL_WINDOW_SHOWN)) {
|
||||
WIN_SetWindowPositionInternal(_this, window, SWP_NOCOPYBITS | SWP_NOMOVE | SWP_NOSIZE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue