diff --git a/windows/window.cpp b/windows/window.cpp index 2c4b7fe8..b3fb696e 100644 --- a/windows/window.cpp +++ b/windows/window.cpp @@ -40,6 +40,7 @@ static void windowRelayout(uiWindow *w) int x, y, width, height; RECT r; int mx, my; + HWND child; if (w->child == NULL) return; @@ -53,7 +54,8 @@ static void windowRelayout(uiWindow *w) y += my; width -= 2 * mx; height -= 2 * my; - // TODO + child = (HWND) uiControlHandle(w->child); + uiWindowsEnsureMoveWindowDuringResize(child, x, y, width, height); } static LRESULT CALLBACK windowWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) diff --git a/windows/winpublic.cpp b/windows/winpublic.cpp index be1cf60c..e8992962 100644 --- a/windows/winpublic.cpp +++ b/windows/winpublic.cpp @@ -29,6 +29,6 @@ void uiWindowsEnsureMoveWindowDuringResize(HWND hwnd, intmax_t x, intmax_t y, in r.top = y; r.right = x + width; r.bottom = y + height; - if (SetWindowPos(hwnd, NULL, r.left, r.top, r.right - r.left, r.bottom - r.top, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOREDRAW | SWP_NOZORDER) == 0) + if (SetWindowPos(hwnd, NULL, r.left, r.top, r.right - r.left, r.bottom - r.top, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER) == 0) logLastError(L"error moving window"); }