diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c index 7bcfd6be6..a5fd00689 100644 --- a/src/video/windows/SDL_windowsevents.c +++ b/src/video/windows/SDL_windowsevents.c @@ -967,12 +967,14 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) 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 */ - if (!(SDL_GetWindowFlags(data->window) & SDL_WINDOW_RESIZABLE)) { + if (!(window_flags & SDL_WINDOW_RESIZABLE)) { int w, h; 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].bottom = params->rgrc[0].top + h; }