"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
|
||||
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?
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue