mirror of https://github.com/encounter/SDL.git
Don't attempt WM_NCCALCSIZE adjustment when in fullscreen window transition
This commit is contained in:
parent
ba0ecc6712
commit
5abd7d16d7
|
@ -967,12 +967,14 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
case WM_NCCALCSIZE:
|
case WM_NCCALCSIZE:
|
||||||
{
|
{
|
||||||
if (wParam == TRUE && SDL_GetWindowFlags(data->window) & SDL_WINDOW_BORDERLESS) {
|
Uint32 window_flags = SDL_GetWindowFlags(data->window);
|
||||||
|
if (wParam == TRUE && (window_flags & SDL_WINDOW_BORDERLESS) && !(window_flags & SDL_WINDOW_FULLSCREEN)) {
|
||||||
/* When borderless, need to tell windows that the size of the non-client area is 0 */
|
/* When borderless, need to tell windows that the size of the non-client area is 0 */
|
||||||
if (!(SDL_GetWindowFlags(data->window) & SDL_WINDOW_RESIZABLE)) {
|
if (!(window_flags & SDL_WINDOW_RESIZABLE)) {
|
||||||
int w, h;
|
int w, h;
|
||||||
NCCALCSIZE_PARAMS *params = (NCCALCSIZE_PARAMS *)lParam;
|
NCCALCSIZE_PARAMS *params = (NCCALCSIZE_PARAMS *)lParam;
|
||||||
SDL_GetWindowSize(data->window, &w, &h);
|
w = data->window->windowed.w;
|
||||||
|
h = data->window->windowed.h;
|
||||||
params->rgrc[0].right = params->rgrc[0].left + w;
|
params->rgrc[0].right = params->rgrc[0].left + w;
|
||||||
params->rgrc[0].bottom = params->rgrc[0].top + h;
|
params->rgrc[0].bottom = params->rgrc[0].top + h;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue