Fixed incorrect window state if the window is created grabbed. We don't want to activate the window if it isn't shown yet.
This commit is contained in:
parent
73a2e37abb
commit
40b7af6399
1 changed files with 5 additions and 1 deletions
|
@ -559,7 +559,7 @@ WIN_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
|
|||
HWND top;
|
||||
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
||||
HWND hwnd = data->hwnd;
|
||||
UINT flags = SWP_NOMOVE | SWP_NOSIZE;
|
||||
UINT flags = SWP_NOCOPYBITS | SWP_NOMOVE | SWP_NOSIZE;
|
||||
|
||||
if ( SDL_ShouldAllowTopmost() && (window->flags & SDL_WINDOW_INPUT_FOCUS ) ) {
|
||||
top = HWND_TOPMOST;
|
||||
|
@ -568,6 +568,10 @@ WIN_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
|
|||
flags |= SWP_NOZORDER;
|
||||
}
|
||||
|
||||
if (!(window->flags & SDL_WINDOW_SHOWN)) {
|
||||
flags |= SWP_NOACTIVATE;
|
||||
}
|
||||
|
||||
SetWindowPos(hwnd, top, 0, 0, 0, 0, flags);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue