Author: akhaldi
Date: Sat Nov 28 18:51:17 2015
New Revision: 70189
URL:
http://svn.reactos.org/svn/reactos?rev=70189&view=rev
Log:
[USER32] Sync mdi.c with Wine Staging 1.7.55. CORE-10536
Modified:
trunk/reactos/media/doc/README.WINE
trunk/reactos/win32ss/user/user32/windows/mdi.c
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Nov 28 18:51:17 2015
@@ -314,7 +314,7 @@
reactos/win32ss/user/user32/windows/cursoricon # Forked from Wine-1.2-rc7
reactos/win32ss/user/user32/windows/defwnd.c # Forked
reactos/win32ss/user/user32/windows/draw.c # Forked at Wine-20020904 (uitools.c)
- reactos/win32ss/user/user32/windows/mdi.c # Synced to Wine-1_1_40
+ reactos/win32ss/user/user32/windows/mdi.c # Synced to WineStaging-1.7.55
reactos/win32ss/user/user32/windows/menu.c # Forked
reactos/win32ss/user/user32/windows/messagebox.c # Forked
reactos/win32ss/user/user32/windows/rect.c # Forked (uitools.c)
@@ -328,7 +328,7 @@
reactos/dll/win32/schannel/secur32_wine.c # partial sync to wine-1.7.17
(secur32/secur32.c)
secur32 -
- reactos/dll/win32/secur32/sspi.c # Partially synced to wine-1.7.55
(secur32.c)
+ reactos/dll/win32/secur32/sspi.c # Partially synced to WineStaging-1.7.55
(secur32.c)
reactos/dll/win32/secur32/thunks.c # Synced to WineStaging-1.7.37
reactos/dll/win32/secur32/wrapper.c # Synced to WineStaging-1.7.37
Modified: trunk/reactos/win32ss/user/user32/windows/mdi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
==============================================================================
--- trunk/reactos/win32ss/user/user32/windows/mdi.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/windows/mdi.c [iso-8859-1] Sat Nov 28 18:51:17 2015
@@ -28,7 +28,7 @@
*
* When we have more than 9 opened windows, a "More Windows..."
* option appears in the "Windows" menu. Each child window has
- * a WND* associated with it, accesible via the children list of
+ * a WND* associated with it, accessible via the children list of
* the parent window. This WND* has a wIDmenu member, which reflects
* the position of the child in the window list. For example, with
* 9 child windows, we could have the following pattern:
@@ -263,7 +263,7 @@
/**********************************************************************
* MDI_GetWindow
*
- * returns "activateable" child different from the current or zero
+ * returns "activatable" child different from the current or zero
*/
static HWND MDI_GetWindow(MDICLIENTINFO *clientInfo, HWND hWnd, BOOL bNext,
DWORD dwStyleMask )
@@ -339,7 +339,7 @@
MDICLIENTINFO *ci;
HWND hwndFrame = GetParent(hwnd);
- TRACE("%p %p %p\n", hwnd, hmenuFrame, hmenuWindow);
+ TRACE("%p, frame menu %p, window menu %p\n", hwnd, hmenuFrame,
hmenuWindow);
if (hmenuFrame && !IsMenu(hmenuFrame))
{
@@ -684,7 +684,7 @@
* SetFocus won't work. It appears that Windows sends WM_SETFOCUS
* manually in this case.
*/
- if (SetFocus( client ) == client)
+ if (SetFocus(client) == client)
SendMessageW( client, WM_SETFOCUS, (WPARAM)client, 0 );
}
@@ -925,7 +925,8 @@
if (!hIcon)
hIcon = (HICON)GetClassLongPtrW(hChild, GCLP_HICON);
if (!hIcon)
- hIcon = LoadImageW(0, (LPWSTR)IDI_WINLOGO, IMAGE_ICON,
GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
+ hIcon = LoadImageW(0, (LPWSTR)IDI_WINLOGO, IMAGE_ICON,
GetSystemMetrics(SM_CXSMICON),
+ GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
if (hIcon)
{
HDC hMemDC;
@@ -957,7 +958,7 @@
{
TRACE("not inserted\n");
DestroyMenu(hSysPopup);
- return FALSE;
+ return FALSE;
}
EnableMenuItem(hSysPopup, SC_SIZE, MF_BYCOMMAND | MF_GRAYED);
@@ -983,15 +984,15 @@
TRACE("frame %p,child %p\n",frame, hChild);
- if( !menu ) return FALSE;
+ if (!menu) return FALSE;
/* if there is no system buttons then nothing to do */
nItems = GetMenuItemCount(menu) - 1;
- iId = GetMenuItemID(menu,nItems) ;
- if( !(iId == SC_RESTORE || iId == SC_CLOSE) )
+ iId = GetMenuItemID(menu, nItems);
+ if ( !(iId == SC_RESTORE || iId == SC_CLOSE) )
{
ERR("no system buttons then nothing to do\n");
- return FALSE;
+ return FALSE;
}
/*
@@ -1115,7 +1116,7 @@
TRACE("%p %04x (%s) %08lx %08lx\n", hwnd, message, SPY_GetMsgName(message,
hwnd), wParam, lParam);
- if (!(ci = get_client_info(hwnd)))
+ if (!(ci = get_client_info( hwnd )))
{
if (message == WM_NCCREATE)
{
@@ -1126,9 +1127,9 @@
ci->hBmpClose = 0;
NtUserSetWindowFNID( hwnd, FNID_MDICLIENT); // wine uses WIN_ISMDICLIENT
#else
- WND *wndPtr = WIN_GetPtr( hwnd );
- wndPtr->flags |= WIN_ISMDICLIENT;
- WIN_ReleasePtr( wndPtr );
+ WND *wndPtr = WIN_GetPtr( hwnd );
+ wndPtr->flags |= WIN_ISMDICLIENT;
+ WIN_ReleasePtr( wndPtr );
#endif
}
return unicode ? DefWindowProcW( hwnd, message, wParam, lParam ) :
@@ -1145,14 +1146,14 @@
LPCLIENTCREATESTRUCT ccs = (LPCLIENTCREATESTRUCT)cs->lpCreateParams;
ci->hWindowMenu = ccs->hWindowMenu;
- ci->idFirstChild = ccs->idFirstChild;
- ci->hwndChildMaximized = 0;
+ ci->idFirstChild = ccs->idFirstChild;
+ ci->hwndChildMaximized = 0;
ci->child = NULL;
ci->nActiveChildren = 0;
ci->nTotalCreated = 0;
ci->frameTitle = NULL;
ci->mdiFlags = 0;
- ci->hFrameMenu = GetMenu(cs->hwndParent);
+ ci->hFrameMenu = GetMenu(cs->hwndParent);
if (!ci->hBmpClose) ci->hBmpClose = CreateMDIMenuBitmap();
@@ -1189,7 +1190,7 @@
case WM_MDIACTIVATE:
{
if( ci->hwndActiveChild != (HWND)wParam )
- SetWindowPos((HWND)wParam, 0,0,0,0,0, SWP_NOSIZE | SWP_NOMOVE);
+ SetWindowPos((HWND)wParam, 0,0,0,0,0, SWP_NOSIZE | SWP_NOMOVE);
return 0;
}
@@ -1520,6 +1521,7 @@
MDICLIENTINFO *ci = get_client_info( client );
TRACE("%p %04x (%s) %08lx %08lx\n", hwnd, message, SPY_GetMsgName(message,
hwnd), wParam, lParam);
+
hwnd = WIN_GetFullHandle( hwnd );
if (!ci) return DefWindowProcA( hwnd, message, wParam, lParam );
@@ -1529,6 +1531,7 @@
DefWindowProcA(hwnd, message, wParam, lParam);
if( ci->hwndChildMaximized == hwnd )
MDI_UpdateFrameText( GetParent(client), client, TRUE, NULL );
+ MDI_RefreshMenu( ci );
return 1; /* success. FIXME: check text length */
case WM_GETMINMAXINFO:
@@ -1569,6 +1572,7 @@
DefWindowProcW(hwnd, message, wParam, lParam);
if( ci->hwndChildMaximized == hwnd )
MDI_UpdateFrameText( GetParent(client), client, TRUE, NULL );
+ MDI_RefreshMenu( ci );
return 1; /* success. FIXME: check text length */
case WM_GETMINMAXINFO:
@@ -1592,7 +1596,7 @@
return 0;
case WM_SYSCOMMAND:
- switch( wParam & 0xfff0)
+ switch (wParam & 0xfff0)
{
case SC_MOVE:
if( ci->hwndChildMaximized == hwnd )
@@ -1602,7 +1606,7 @@
case SC_MINIMIZE:
break;
case SC_MAXIMIZE:
- if (ci->hwndChildMaximized == hwnd )
+ if (ci->hwndChildMaximized == hwnd)
return SendMessageW( GetParent(client), message, wParam, lParam);
break;
case SC_NEXTWINDOW:
@@ -1626,7 +1630,7 @@
/* do not change */
TRACE("current active %p, maximized %p\n", ci->hwndActiveChild,
ci->hwndChildMaximized);
- if( ci->hwndChildMaximized == hwnd && wParam != SIZE_MAXIMIZED)
+ if( ci->hwndChildMaximized == hwnd && wParam != SIZE_MAXIMIZED )
{
HWND frame;
@@ -2001,8 +2005,9 @@
return 0;
}
+
/***********************************************************************
- * CascadeChildWindows (USER32.@)
+ * CascadeChildWindows (USER32.@)
*/
WORD WINAPI CascadeChildWindows( HWND parent, UINT flags )
{
@@ -2025,8 +2030,9 @@
return 0;
}
+
/***********************************************************************
- * TileChildWindows (USER32.@)
+ * TileChildWindows (USER32.@)
*/
WORD WINAPI TileChildWindows( HWND parent, UINT flags )
{