- MDI Sync/Port from wine head, not sure about Staging.

svn path=/trunk/; revision=72520
This commit is contained in:
James Tabor 2016-08-31 16:05:34 +00:00
parent a809e4ff02
commit 303ece2421

View file

@ -87,11 +87,9 @@
WINE_DEFAULT_DEBUG_CHANNEL(mdi);
#define MDI_MAXTITLELENGTH 0xa1
#ifdef __REACTOS__
#define WM_MDICALCCHILDSCROLL 0x003F // ReactOS: Uses correct value.
#else // Really? ---v win:test_mdi looks for the above value.
#define WM_MDICALCCHILDSCROLL 0x10ac /* this is exactly what Windows uses */
#endif
#define WM_MDICALCCHILDSCROLL 0x003F /* this is exactly what Windows uses */
/* "More Windows..." definitions */
#define MDI_MOREWINDOWSLIMIT 9 /* after this number of windows, a "More Windows..."
option will appear under the Windows menu */
@ -405,17 +403,6 @@ static LRESULT MDISetMenu( HWND hwnd, HMENU hmenuFrame,
return (LRESULT)oldFrameMenu;
}
}
else
{
/* SetMenu() may already have been called, meaning that this window
* already has its menu. But they may have done a SetMenu() on
* an MDI window, and called MDISetMenu() after the fact, meaning
* that the "if" to this "else" wouldn't catch the need to
* augment the frame menu.
*/
if( ci->hwndChildMaximized )
MDI_AugmentFrameMenu( hwndFrame, ci->hwndChildMaximized );
}
return 0;
}
@ -435,7 +422,7 @@ static LRESULT MDI_RefreshMenu(MDICLIENTINFO *ci)
if (!IsMenu(ci->hWindowMenu))
{
WARN("Window menu handle %p is no more valid\n", ci->hWindowMenu);
WARN("Window menu handle %p is no longer valid\n", ci->hWindowMenu);
return 0;
}
@ -536,8 +523,7 @@ static void MDI_ChildGetMinMaxInfo( HWND client, HWND hwnd, MINMAXINFO* lpMinMax
lpMinMax->ptMaxPosition.x = rect.left;
lpMinMax->ptMaxPosition.y = rect.top;
TRACE("max rect (%ld,%ld - %ld, %ld)\n",
rect.left,rect.top,rect.right,rect.bottom);
TRACE("max rect %s\n", wine_dbgstr_rect(&rect));
}
/**********************************************************************
@ -1130,9 +1116,7 @@ LRESULT WINAPI MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam,
ci->hBmpClose = 0;
NtUserSetWindowFNID( hwnd, FNID_MDICLIENT); // wine uses WIN_ISMDICLIENT
#else
WND *wndPtr = WIN_GetPtr( hwnd );
wndPtr->flags |= WIN_ISMDICLIENT;
WIN_ReleasePtr( wndPtr );
if (message == WM_NCCREATE) win_set_flags( hwnd, WIN_ISMDICLIENT, 0 );
#endif
}
return unicode ? DefWindowProcW( hwnd, message, wParam, lParam ) :
@ -1342,10 +1326,7 @@ LRESULT WINAPI MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam,
{
RECT rect;
rect.left = 0;
rect.top = 0;
rect.right = LOWORD(lParam);
rect.bottom = HIWORD(lParam);
SetRect(&rect, 0, 0, LOWORD(lParam), HIWORD(lParam));
AdjustWindowRectEx(&rect, GetWindowLongPtrA(ci->hwndActiveChild, GWL_STYLE),
0, GetWindowLongPtrA(ci->hwndActiveChild, GWL_EXSTYLE) );
MoveWindow(ci->hwndActiveChild, rect.left, rect.top,