mirror of https://github.com/encounter/SDL.git
Non-resizable windows need to have their window rect set to the client rect
This commit is contained in:
parent
88e3562ba0
commit
25df5a5ac9
|
@ -951,10 +951,18 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
case WM_NCCALCSIZE:
|
||||
{
|
||||
// When borderless, need to tell windows that the size of the non-client area is 0
|
||||
if ( wParam == TRUE && SDL_GetWindowFlags( data->window ) & SDL_WINDOW_BORDERLESS )
|
||||
if (wParam == TRUE && SDL_GetWindowFlags(data->window) & SDL_WINDOW_BORDERLESS) {
|
||||
/* When borderless, need to tell windows that the size of the non-client area is 0 */
|
||||
if (!(SDL_GetWindowFlags(data->window) & SDL_WINDOW_RESIZABLE)) {
|
||||
int w, h;
|
||||
NCCALCSIZE_PARAMS *params = (NCCALCSIZE_PARAMS *)lParam;
|
||||
SDL_GetWindowSize(data->window, &w, &h);
|
||||
params->rgrc[0].right = params->rgrc[0].left + w;
|
||||
params->rgrc[0].bottom = params->rgrc[0].top + h;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_NCHITTEST:
|
||||
|
|
Loading…
Reference in New Issue