mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
[Win32k]
- Support Active SxS for the window structures. svn path=/trunk/; revision=54101
This commit is contained in:
parent
1212f4fec9
commit
fdcbfe037e
|
@ -6,7 +6,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 @@ typedef struct _CALLBACKWND
|
|||
{
|
||||
HWND hWnd;
|
||||
struct _WND *pWnd;
|
||||
PVOID pActCtx;
|
||||
} CALLBACKWND, *PCALLBACKWND;
|
||||
|
||||
#define CI_TRANSACTION 0x00000001
|
||||
|
@ -284,7 +284,7 @@ typedef struct _CLIENTINFO
|
|||
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 @@ typedef struct _WND
|
|||
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;
|
||||
|
|
|
@ -47,7 +47,7 @@ VOID FASTCALL IntGetWindowBorderMeasures(PWND WindowObject, UINT *cx, UINT *cy);
|
|||
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);
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ IntCleanupThreadCallbacks(PTHREADINFO W32Thread)
|
|||
// 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 @@ IntSetTebWndCallback (HWND * hWnd, PWND * pWnd)
|
|||
|
||||
*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 @@ co_IntCallSentMessageCallback(SENDASYNCPROC CompletionCallback,
|
|||
LRESULT Result)
|
||||
{
|
||||
SENDASYNCPROC_CALLBACK_ARGUMENTS Arguments;
|
||||
PVOID ResultPointer;
|
||||
PVOID ResultPointer, pActCtx;
|
||||
PWND pWnd;
|
||||
ULONG ResultLength;
|
||||
NTSTATUS Status;
|
||||
|
@ -238,7 +241,7 @@ co_IntCallSentMessageCallback(SENDASYNCPROC CompletionCallback,
|
|||
Arguments.Context = CompletionCallbackContext;
|
||||
Arguments.Result = Result;
|
||||
|
||||
IntSetTebWndCallback (&hWnd, &pWnd);
|
||||
IntSetTebWndCallback (&hWnd, &pWnd, &pActCtx);
|
||||
|
||||
UserLeaveCo();
|
||||
|
||||
|
@ -250,7 +253,7 @@ co_IntCallSentMessageCallback(SENDASYNCPROC CompletionCallback,
|
|||
|
||||
UserEnterCo();
|
||||
|
||||
IntRestoreTebWndCallback (hWnd, pWnd);
|
||||
IntRestoreTebWndCallback (hWnd, pWnd, pActCtx);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
|
@ -271,7 +274,7 @@ co_IntCallWindowProc(WNDPROC Proc,
|
|||
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 @@ co_IntCallWindowProc(WNDPROC Proc,
|
|||
ResultPointer = NULL;
|
||||
ResultLength = ArgumentLength;
|
||||
|
||||
IntSetTebWndCallback (&Wnd, &pWnd);
|
||||
IntSetTebWndCallback (&Wnd, &pWnd, &pActCtx);
|
||||
|
||||
UserLeaveCo();
|
||||
|
||||
|
@ -328,7 +331,7 @@ co_IntCallWindowProc(WNDPROC Proc,
|
|||
|
||||
UserEnterCo();
|
||||
|
||||
IntRestoreTebWndCallback (Wnd, pWnd);
|
||||
IntRestoreTebWndCallback (Wnd, pWnd, pActCtx);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
|
|
|
@ -1060,7 +1060,7 @@ NtUserCreateDesktop(
|
|||
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 @@ NtUserCreateDesktop(
|
|||
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");
|
||||
|
|
|
@ -1557,7 +1557,8 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
|
|||
PLARGE_STRING WindowName,
|
||||
PCLS Class,
|
||||
PWND ParentWindow,
|
||||
PWND OwnerWindow)
|
||||
PWND OwnerWindow,
|
||||
PVOID acbiBuffer)
|
||||
{
|
||||
PWND pWnd = NULL;
|
||||
HWND hWnd;
|
||||
|
@ -1642,6 +1643,7 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
|
|||
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 @@ AllocError:
|
|||
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 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
|||
WindowName,
|
||||
Class,
|
||||
ParentWindow,
|
||||
OwnerWindow);
|
||||
OwnerWindow,
|
||||
acbiBuffer);
|
||||
if(!Window)
|
||||
{
|
||||
ERR("IntCreateWindow failed!\n");
|
||||
|
@ -2347,7 +2351,7 @@ NtUserCreateWindowEx(
|
|||
UserEnterExclusive();
|
||||
|
||||
/* Call the internal function */
|
||||
pwnd = co_UserCreateWindowEx(&Cs, &ustrClassName, plstrWindowName);
|
||||
pwnd = co_UserCreateWindowEx(&Cs, &ustrClassName, plstrWindowName, acbiBuffer);
|
||||
|
||||
if(!pwnd)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue