[deploy] fix: missing WindowResizedEvent when maximized

This commit is contained in:
Nomango 2020-10-16 00:17:58 +08:00
parent 266453a907
commit 18a0fd5e55
1 changed files with 19 additions and 10 deletions

View File

@ -603,6 +603,7 @@ LRESULT WindowWin32Impl::MessageProc(HWND hwnd, UINT32 msg, WPARAM wparam, LPARA
case WM_SIZE:
{
bool resized = false;
if (SIZE_MAXHIDE == wparam || SIZE_MINIMIZED == wparam)
{
KGE_DEBUG_LOGF("Window minimized");
@ -620,6 +621,10 @@ LRESULT WindowWin32Impl::MessageProc(HWND hwnd, UINT32 msg, WPARAM wparam, LPARA
is_minimized_ = false;
Application::GetInstance().Resume();
}
else
{
resized = true;
}
}
else if (wparam == SIZE_RESTORED)
{
@ -636,6 +641,11 @@ LRESULT WindowWin32Impl::MessageProc(HWND hwnd, UINT32 msg, WPARAM wparam, LPARA
// DO NOTHING until the dragging / resizing has stopped.
}
else
{
resized = true;
}
}
if (resized)
{
this->width_ = ((uint32_t)(short)LOWORD(lparam));
this->height_ = ((uint32_t)(short)HIWORD(lparam));
@ -649,7 +659,6 @@ LRESULT WindowWin32Impl::MessageProc(HWND hwnd, UINT32 msg, WPARAM wparam, LPARA
KGE_DEBUG_LOGF("Window resized to (%d, %d)", this->width_, this->height_);
}
}
}
break;
case WM_ENTERSIZEMOVE: