Author: jimtabor Date: Thu Dec 30 00:59:10 2010 New Revision: 50218
URL: http://svn.reactos.org/svn/reactos?rev=50218&view=rev Log: [Win32k|User32] - Fix mdi class window function Id, now msi message tests do not assert.
Modified: trunk/reactos/dll/win32/user32/windows/mdi.c trunk/reactos/dll/win32/user32/windows/window.c trunk/reactos/subsystems/win32/win32k/ntuser/window.c
Modified: trunk/reactos/dll/win32/user32/windows/mdi.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/md... ============================================================================== --- trunk/reactos/dll/win32/user32/windows/mdi.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/mdi.c [iso-8859-1] Thu Dec 30 00:59:10 2010 @@ -1111,6 +1111,7 @@ return FALSE; SetWindowLongPtrW( hwnd, 0, (LONG_PTR)ci ); ci->hBmpClose = 0; + NtUserSetWindowFNID( hwnd, FNID_MDICLIENT); // wine uses WIN_ISMDICLIENT #else WND *wndPtr = WIN_GetPtr( hwnd ); wndPtr->flags |= WIN_ISMDICLIENT; @@ -1160,6 +1161,7 @@ #ifdef __REACTOS__ HeapFree( GetProcessHeap(), 0, ci ); SetWindowLongPtrW( hwnd, 0, 0 ); + NtUserSetWindowFNID(hwnd, FNID_DESTROY); #endif return 0; }
Modified: trunk/reactos/dll/win32/user32/windows/window.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/wi... ============================================================================== --- trunk/reactos/dll/win32/user32/windows/window.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/window.c [iso-8859-1] Thu Dec 30 00:59:10 2010 @@ -343,15 +343,12 @@ UINT id = 0; HWND top_child; PWND pWndParent; - PCLS pCls;
pWndParent = ValidateHwnd(hWndParent);
if (!pWndParent) return NULL;
- pCls = DesktopPtrToUser(pWndParent->pcls); - - if (pCls->fnid != FNID_MDICLIENT) // wine uses WIN_ISMDICLIENT + if (pWndParent->fnid != FNID_MDICLIENT) // wine uses WIN_ISMDICLIENT { WARN("WS_EX_MDICHILD, but parent %p is not MDIClient\n", hWndParent); return NULL; @@ -469,15 +466,12 @@ UINT id = 0; HWND top_child; PWND pWndParent; - PCLS pCls;
pWndParent = ValidateHwnd(hWndParent);
if (!pWndParent) return NULL;
- pCls = DesktopPtrToUser(pWndParent->pcls); - - if (pCls->fnid != FNID_MDICLIENT) + if (pWndParent->fnid != FNID_MDICLIENT) { WARN("WS_EX_MDICHILD, but parent %p is not MDIClient\n", hWndParent); return NULL;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] Thu Dec 30 00:59:10 2010 @@ -3878,15 +3878,23 @@ RETURN( FALSE); }
- if (Wnd->pcls) - { // From user land we only set these. - if ((fnID != FNID_DESTROY) || ((fnID < FNID_BUTTON) && (fnID > FNID_IME)) ) + if (Wnd->head.pti->ppi != PsGetCurrentProcessWin32Process()) + { + EngSetLastError(ERROR_ACCESS_DENIED); + RETURN( FALSE); + } + + // From user land we only set these. + if (fnID != FNID_DESTROY) + { + if ( ((fnID < FNID_BUTTON) && (fnID > FNID_IME)) || + Wnd->fnid != 0 ) { RETURN( FALSE); } - else - Wnd->pcls->fnid |= fnID; - } + } + + Wnd->fnid |= fnID; RETURN( TRUE);
CLEANUP: