summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--new/container_windows.c3
-rw-r--r--new/uipriv_windows.h1
-rw-r--r--new/window_windows.c6
3 files changed, 8 insertions, 2 deletions
diff --git a/new/container_windows.c b/new/container_windows.c
index d56830e..27f01d2 100644
--- a/new/container_windows.c
+++ b/new/container_windows.c
@@ -94,10 +94,13 @@ void updateParent(uintptr_t h)
if (h == 0) // no parent
return;
hwnd = (HWND) h;
+/*TODO
// TODO is there a better way?
if (GetWindowRect(hwnd, &r) == 0)
logLastError("error getting window rect for dummy move in updateParent()");
if (MoveWindow(hwnd, r.left, r.top, r.right - r.left, r.bottom - r.top, TRUE) == 0)
logLastError("error moving window in updateParent()");
+*/
+ SendMessageW(hwnd, msgUpdateChild, 0, 0);
// TODO invalidate rect?
}
diff --git a/new/uipriv_windows.h b/new/uipriv_windows.h
index bc8890a..7f5f8c8 100644
--- a/new/uipriv_windows.h
+++ b/new/uipriv_windows.h
@@ -33,6 +33,7 @@ enum {
// redirected WM_COMMAND and WM_NOTIFY
msgCOMMAND = WM_APP + 0x40, // start offset just to be safe
msgNOTIFY,
+ msgUpdateChild, // fake because wine (only? TODO) seems to SWP_NOSIZE MoveWindow()s and SetWindowPos()s that don't change the window size (even if SWP_NOSIZE isn't specified)
};
// debug_windows.c
diff --git a/new/window_windows.c b/new/window_windows.c
index 881173d..88e7aae 100644
--- a/new/window_windows.c
+++ b/new/window_windows.c
@@ -30,10 +30,12 @@ static LRESULT CALLBACK uiWindowWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPA
return lResult;
switch (uMsg) {
case WM_WINDOWPOSCHANGED:
- if (w->child == NULL)
- break;
if ((wp->flags & SWP_NOSIZE) != 0)
break;
+ // fall through
+ case msgUpdateChild:
+ if (w->child == NULL)
+ break;
if (GetClientRect(w->hwnd, &r) == 0)
logLastError("error getting window client rect for resize in uiWindowWndProc()");
resize(w->child, w->hwnd, r);