"Fixed" initial Windows window shows for now (see previous commit). Not yet a clean fix; need to test some things on real Windows first.
This commit is contained in:
parent
87bb732832
commit
fef91d9820
|
@ -94,10 +94,13 @@ void updateParent(uintptr_t h)
|
||||||
if (h == 0) // no parent
|
if (h == 0) // no parent
|
||||||
return;
|
return;
|
||||||
hwnd = (HWND) h;
|
hwnd = (HWND) h;
|
||||||
|
/*TODO
|
||||||
// TODO is there a better way?
|
// TODO is there a better way?
|
||||||
if (GetWindowRect(hwnd, &r) == 0)
|
if (GetWindowRect(hwnd, &r) == 0)
|
||||||
logLastError("error getting window rect for dummy move in updateParent()");
|
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)
|
if (MoveWindow(hwnd, r.left, r.top, r.right - r.left, r.bottom - r.top, TRUE) == 0)
|
||||||
logLastError("error moving window in updateParent()");
|
logLastError("error moving window in updateParent()");
|
||||||
|
*/
|
||||||
|
SendMessageW(hwnd, msgUpdateChild, 0, 0);
|
||||||
// TODO invalidate rect?
|
// TODO invalidate rect?
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@ enum {
|
||||||
// redirected WM_COMMAND and WM_NOTIFY
|
// redirected WM_COMMAND and WM_NOTIFY
|
||||||
msgCOMMAND = WM_APP + 0x40, // start offset just to be safe
|
msgCOMMAND = WM_APP + 0x40, // start offset just to be safe
|
||||||
msgNOTIFY,
|
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
|
// debug_windows.c
|
||||||
|
|
|
@ -30,10 +30,12 @@ static LRESULT CALLBACK uiWindowWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPA
|
||||||
return lResult;
|
return lResult;
|
||||||
switch (uMsg) {
|
switch (uMsg) {
|
||||||
case WM_WINDOWPOSCHANGED:
|
case WM_WINDOWPOSCHANGED:
|
||||||
if (w->child == NULL)
|
|
||||||
break;
|
|
||||||
if ((wp->flags & SWP_NOSIZE) != 0)
|
if ((wp->flags & SWP_NOSIZE) != 0)
|
||||||
break;
|
break;
|
||||||
|
// fall through
|
||||||
|
case msgUpdateChild:
|
||||||
|
if (w->child == NULL)
|
||||||
|
break;
|
||||||
if (GetClientRect(w->hwnd, &r) == 0)
|
if (GetClientRect(w->hwnd, &r) == 0)
|
||||||
logLastError("error getting window client rect for resize in uiWindowWndProc()");
|
logLastError("error getting window client rect for resize in uiWindowWndProc()");
|
||||||
resize(w->child, w->hwnd, r);
|
resize(w->child, w->hwnd, r);
|
||||||
|
|
Loading…
Reference in New Issue