Author: jimtabor Date: Wed Oct 12 22:46:07 2011 New Revision: 54101
URL: http://svn.reactos.org/svn/reactos?rev=54101&view=rev Log: [Win32k] - Support Active SxS for the window structures.
Modified: trunk/reactos/include/reactos/win32k/ntuser.h trunk/reactos/subsystems/win32/win32k/include/window.h trunk/reactos/subsystems/win32/win32k/ntuser/callback.c trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c trunk/reactos/subsystems/win32/win32k/ntuser/window.c
Modified: trunk/reactos/include/reactos/win32k/ntuser.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntus... ============================================================================== --- trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] Wed Oct 12 22:46:07 2011 @@ -5,7 +5,6 @@ typedef struct _THREADINFO *PTHREADINFO; struct _DESKTOP; struct _WND; -
#define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */ #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */ @@ -247,6 +246,7 @@ { HWND hWnd; struct _WND *pWnd; + PVOID pActCtx; } CALLBACKWND, *PCALLBACKWND;
#define CI_TRANSACTION 0x00000001 @@ -284,7 +284,7 @@ UCHAR achDbcsCF[2]; MSG msgDbcsCB; LPDWORD lpdwRegisteredClasses; - ULONG Win32ClientInfo3[27]; + ULONG Win32ClientInfo3[26]; /* It's just a pointer reference not to be used w the structure in user space. */ PPROCESSINFO ppi; } CLIENTINFO, *PCLIENTINFO; @@ -591,7 +591,7 @@ struct _WND *spwndLastActive; //HIMC hImc; // Input context associated with this window. LONG dwUserData; - //PACTIVATION_CONTEXT pActCtx; + PVOID pActCtx; //PD3DMATRIX pTransForm; struct _WND *spwndClipboardListener; DWORD ExStyle2;
Modified: trunk/reactos/subsystems/win32/win32k/include/window.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/inc... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/window.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/window.h [iso-8859-1] Wed Oct 12 22:46:07 2011 @@ -47,7 +47,7 @@ BOOL FASTCALL IntShowOwnedPopups( PWND owner, BOOL fShow ); LRESULT FASTCALL IntDefWindowProc( PWND Window, UINT Msg, WPARAM wParam, LPARAM lParam, BOOL Ansi); VOID FASTCALL IntNotifyWinEvent(DWORD, PWND, LONG, LONG, DWORD); -PWND FASTCALL co_UserCreateWindowEx(CREATESTRUCTW*, PUNICODE_STRING, PLARGE_STRING); +PWND FASTCALL co_UserCreateWindowEx(CREATESTRUCTW*, PUNICODE_STRING, PLARGE_STRING, PVOID); BOOL FASTCALL IntEnableWindow(HWND,BOOL); DWORD FASTCALL GetNCHitEx(PWND pWnd, POINT pt);
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/callback.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/callback.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/callback.c [iso-8859-1] Wed Oct 12 22:46:07 2011 @@ -87,7 +87,7 @@ // This will help user space programs speed up read access with the window object. // static VOID -IntSetTebWndCallback (HWND * hWnd, PWND * pWnd) +IntSetTebWndCallback (HWND * hWnd, PWND * pWnd, PVOID * pActCtx) { HWND hWndS = *hWnd; PWND Window = UserGetWindowObject(*hWnd); @@ -95,18 +95,21 @@
*hWnd = ClientInfo->CallbackWnd.hWnd; *pWnd = ClientInfo->CallbackWnd.pWnd; + *pActCtx = ClientInfo->CallbackWnd.pActCtx;
ClientInfo->CallbackWnd.hWnd = hWndS; ClientInfo->CallbackWnd.pWnd = DesktopHeapAddressToUser(Window); + ClientInfo->CallbackWnd.pActCtx = Window->pActCtx; }
static VOID -IntRestoreTebWndCallback (HWND hWnd, PWND pWnd) +IntRestoreTebWndCallback (HWND hWnd, PWND pWnd, PVOID pActCtx) { PCLIENTINFO ClientInfo = GetWin32ClientInfo();
ClientInfo->CallbackWnd.hWnd = hWnd; ClientInfo->CallbackWnd.pWnd = pWnd; + ClientInfo->CallbackWnd.pActCtx = pActCtx; }
/* FUNCTIONS *****************************************************************/ @@ -227,7 +230,7 @@ LRESULT Result) { SENDASYNCPROC_CALLBACK_ARGUMENTS Arguments; - PVOID ResultPointer; + PVOID ResultPointer, pActCtx; PWND pWnd; ULONG ResultLength; NTSTATUS Status; @@ -238,7 +241,7 @@ Arguments.Context = CompletionCallbackContext; Arguments.Result = Result;
- IntSetTebWndCallback (&hWnd, &pWnd); + IntSetTebWndCallback (&hWnd, &pWnd, &pActCtx);
UserLeaveCo();
@@ -250,7 +253,7 @@
UserEnterCo();
- IntRestoreTebWndCallback (hWnd, pWnd); + IntRestoreTebWndCallback (hWnd, pWnd, pActCtx);
if (!NT_SUCCESS(Status)) { @@ -271,7 +274,7 @@ WINDOWPROC_CALLBACK_ARGUMENTS StackArguments; PWINDOWPROC_CALLBACK_ARGUMENTS Arguments; NTSTATUS Status; - PVOID ResultPointer; + PVOID ResultPointer, pActCtx; PWND pWnd; ULONG ResultLength; ULONG ArgumentLength; @@ -304,7 +307,7 @@ ResultPointer = NULL; ResultLength = ArgumentLength;
- IntSetTebWndCallback (&Wnd, &pWnd); + IntSetTebWndCallback (&Wnd, &pWnd, &pActCtx);
UserLeaveCo();
@@ -328,7 +331,7 @@
UserEnterCo();
- IntRestoreTebWndCallback (Wnd, pWnd); + IntRestoreTebWndCallback (Wnd, pWnd, pActCtx);
if (!NT_SUCCESS(Status)) {
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] Wed Oct 12 22:46:07 2011 @@ -1060,7 +1060,7 @@ Cs.lpszName = (LPCWSTR) &WindowName; Cs.lpszClass = (LPCWSTR) &ClassName;
- pWndDesktop = co_UserCreateWindowEx(&Cs, &ClassName, &WindowName); + pWndDesktop = co_UserCreateWindowEx(&Cs, &ClassName, &WindowName, NULL); if (!pWnd) { ERR("Failed to create Desktop window handle\n"); @@ -1088,7 +1088,7 @@ Cs.lpszName = (LPCWSTR) &WindowName; Cs.lpszClass = (LPCWSTR) &ClassName;
- pWnd = co_UserCreateWindowEx(&Cs, &ClassName, &WindowName); + pWnd = co_UserCreateWindowEx(&Cs, &ClassName, &WindowName, NULL); if (!pWnd) { ERR("Failed to create Message window handle\n");
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] Wed Oct 12 22:46:07 2011 @@ -1557,7 +1557,8 @@ PLARGE_STRING WindowName, PCLS Class, PWND ParentWindow, - PWND OwnerWindow) + PWND OwnerWindow, + PVOID acbiBuffer) { PWND pWnd = NULL; HWND hWnd; @@ -1642,6 +1643,7 @@ pWnd->style = Cs->style & ~WS_VISIBLE; pWnd->ExStyle = Cs->dwExStyle; pWnd->cbwndExtra = pWnd->pcls->cbwndExtra; + pWnd->pActCtx = acbiBuffer;
IntReferenceMessageQueue(pWnd->head.pti->MessageQueue); if (pWnd->spwndParent != NULL && Cs->hwndParent != 0) @@ -1835,7 +1837,8 @@ PWND FASTCALL co_UserCreateWindowEx(CREATESTRUCTW* Cs, PUNICODE_STRING ClassName, - PLARGE_STRING WindowName) + PLARGE_STRING WindowName, + PVOID acbiBuffer) { PWND Window = NULL, ParentWindow = NULL, OwnerWindow; HWND hWnd, hWndParent, hWndOwner, hwndInsertAfter; @@ -1914,7 +1917,8 @@ WindowName, Class, ParentWindow, - OwnerWindow); + OwnerWindow, + acbiBuffer); if(!Window) { ERR("IntCreateWindow failed!\n"); @@ -2347,7 +2351,7 @@ UserEnterExclusive();
/* Call the internal function */ - pwnd = co_UserCreateWindowEx(&Cs, &ustrClassName, plstrWindowName); + pwnd = co_UserCreateWindowEx(&Cs, &ustrClassName, plstrWindowName, acbiBuffer);
if(!pwnd) {