diff options
| author | Pietro Gagliardi <[email protected]> | 2015-04-12 22:57:05 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-04-12 22:57:05 -0400 |
| commit | 95309affc06c3a40e5bb2b67d489161b5779aec9 (patch) | |
| tree | 815f02b341522cf1c2c95edfc3bf874dafb1f7ee /new/window_windows.c | |
| parent | 365e61dad21a240a82126938d7df179489e8bcc6 (diff) | |
Fixed build issues. Now to fix runtime issues...
Diffstat (limited to 'new/window_windows.c')
| -rw-r--r-- | new/window_windows.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/new/window_windows.c b/new/window_windows.c index a54fd30..a52debf 100644 --- a/new/window_windows.c +++ b/new/window_windows.c @@ -17,6 +17,8 @@ static LRESULT CALLBACK uiWindowWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPA uiWindow *w; CREATESTRUCTW *cs = (CREATESTRUCTW *) lParam; WINDOWPOS *wp = (WINDOWPOS *) lParam; + RECT r; + HWND contenthwnd; w = (uiWindow *) GetWindowLongPtrW(hwnd, GWLP_USERDATA); if (w == NULL) { @@ -27,9 +29,11 @@ static LRESULT CALLBACK uiWindowWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPA } switch (uMsg) { case WM_WINDOWPOSCHANGED: + if ((wp->flags & SWP_NOSIZE) != 0) + break; if (GetClientRect(w->hwnd, &r) == 0) logLastError("error getting window client rect for resize in uiWindowWndProc()"); - contenthwnd = (HWND) uiParentHandle(content); + contenthwnd = (HWND) uiParentHandle(w->content); if (MoveWindow(contenthwnd, r.left, r.top, r.right - r.left, r.bottom - r.top, TRUE) == 0) logLastError("error resizing window content parent in uiWindowWndProc()"); return 0; @@ -38,8 +42,7 @@ static LRESULT CALLBACK uiWindowWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPA return 0; break; // fall through to DefWindowProcW() case WM_DESTROY: - if (w->child != NULL) - uiControlDestroy(w->child); + // no need to free the child ourselves; it'll destroy itself after we leave this handler uiFree(w); break; // fall through to DefWindowProcW() } |
