fix graphics glitch on toggle smart-sizing

This commit is contained in:
garbb 2022-09-12 14:43:22 -07:00 committed by akallabeth
parent 707b9348ee
commit 383ecc3cbd

View File

@ -677,6 +677,18 @@ LRESULT CALLBACK wf_event_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam
CheckMenuItem(hMenu, SYSCOMMAND_ID_SMARTSIZING,
wfc->common.context.settings->SmartSizing ? MF_CHECKED
: MF_UNCHECKED);
if (!wfc->common.context.settings->SmartSizing)
{
SetWindowPos(wfc->hwnd, HWND_TOP, -1, -1,
wfc->common.context.settings->DesktopWidth + wfc->diff.x,
wfc->common.context.settings->DesktopHeight + wfc->diff.y,
SWP_NOMOVE);
}
else
{
wf_size_scrollbars(wfc, wfc->client_width, wfc->client_height);
wf_send_resize(wfc);
}
}
else
{