[Win32k|User32]

- Updated headers for the next round of changes.

svn path=/trunk/; revision=45068
This commit is contained in:
James Tabor 2010-01-14 00:43:54 +00:00
parent f9868fc771
commit 058c21696d
6 changed files with 36 additions and 23 deletions

View file

@ -524,7 +524,7 @@ PWND
FASTCALL FASTCALL
GetThreadDesktopWnd(VOID) GetThreadDesktopWnd(VOID)
{ {
PWND Wnd = GetThreadDesktopInfo()->Wnd; PWND Wnd = GetThreadDesktopInfo()->spwnd;
if (Wnd != NULL) if (Wnd != NULL)
Wnd = DesktopPtrToUser(Wnd); Wnd = DesktopPtrToUser(Wnd);
return Wnd; return Wnd;

View file

@ -40,13 +40,13 @@ typedef struct _DESKTOPINFO
{ {
PVOID pvDesktopBase; PVOID pvDesktopBase;
PVOID pvDesktopLimit; PVOID pvDesktopLimit;
struct _WND *spwnd;
DWORD fsHooks;
struct tagHOOK * aphkStart[16];
HANDLE hKernelHeap;
ULONG_PTR HeapLimit;
HWND hTaskManWindow; HWND hTaskManWindow;
HWND hProgmanWindow; HWND hProgmanWindow;
HWND hShellWindow; HWND hShellWindow;
struct _WND *Wnd;
union union
{ {

View file

@ -6,29 +6,36 @@
typedef struct _DESKTOP typedef struct _DESKTOP
{ {
PDESKTOPINFO pDeskInfo;
LIST_ENTRY ListEntry;
PWND spwndForeground;
PWND spwndTray;
PWND spwndMessage;
PWND spwndTooltip;
PSECTION_OBJECT hsectionDesktop;
PWIN32HEAP pheapDesktop;
ULONG_PTR ulHeapSize;
LIST_ENTRY PtiList;
/* use for tracking mouse moves. */
PWND spwndTrack;
DWORD htEx;
RECT rcMouseHover;
DWORD dwMouseHoverTime;
/* ReactOS */
CSHORT Type; CSHORT Type;
CSHORT Size; CSHORT Size;
LIST_ENTRY ListEntry; /* Rectangle of the work area */
RECTL WorkArea;
LIST_ENTRY PtiList;
/* Pointer to the associated window station. */ /* Pointer to the associated window station. */
struct _WINSTATION_OBJECT *WindowStation; struct _WINSTATION_OBJECT *WindowStation;
/* Pointer to the active queue. */ /* Pointer to the active queue. */
PVOID ActiveMessageQueue; PVOID ActiveMessageQueue;
/* Rectangle of the work area */
RECTL WorkArea;
/* Handle of the desktop window. */ /* Handle of the desktop window. */
HANDLE DesktopWindow; HANDLE DesktopWindow;
/* Thread blocking input */ /* Thread blocking input */
PVOID BlockInputThread; PVOID BlockInputThread;
LIST_ENTRY ShellHookWindows; LIST_ENTRY ShellHookWindows;
PWIN32HEAP pheapDesktop;
PSECTION_OBJECT DesktopHeapSection;
PDESKTOPINFO pDeskInfo;
PWND spwndMessage;
} DESKTOP, *PDESKTOP; } DESKTOP, *PDESKTOP;
extern PDESKTOP InputDesktop; extern PDESKTOP InputDesktop;

View file

@ -847,10 +847,10 @@ BOOL IntDeRegisterShellHookWindow(HWND hWnd)
static VOID static VOID
IntFreeDesktopHeap(IN OUT PDESKTOP Desktop) IntFreeDesktopHeap(IN OUT PDESKTOP Desktop)
{ {
if (Desktop->DesktopHeapSection != NULL) if (Desktop->hsectionDesktop != NULL)
{ {
ObDereferenceObject(Desktop->DesktopHeapSection); ObDereferenceObject(Desktop->hsectionDesktop);
Desktop->DesktopHeapSection = NULL; Desktop->hsectionDesktop = NULL;
} }
} }
/* SYSCALLS *******************************************************************/ /* SYSCALLS *******************************************************************/
@ -1018,8 +1018,8 @@ NtUserCreateDesktop(
NULL); NULL);
if (!NT_SUCCESS(Status)) RETURN(NULL); if (!NT_SUCCESS(Status)) RETURN(NULL);
DesktopObject->DesktopHeapSection = NULL; DesktopObject->hsectionDesktop = NULL;
DesktopObject->pheapDesktop = UserCreateHeap(&DesktopObject->DesktopHeapSection, DesktopObject->pheapDesktop = UserCreateHeap(&DesktopObject->hsectionDesktop,
&DesktopHeapSystemBase, &DesktopHeapSystemBase,
HeapSize); HeapSize);
if (DesktopObject->pheapDesktop == NULL) if (DesktopObject->pheapDesktop == NULL)
@ -1890,7 +1890,7 @@ IntMapDesktopView(IN PDESKTOP DesktopObject)
/* we're the first, map the heap */ /* we're the first, map the heap */
DPRINT("Noone mapped the desktop heap %p yet, so - map it!\n", DesktopObject->pheapDesktop); DPRINT("Noone mapped the desktop heap %p yet, so - map it!\n", DesktopObject->pheapDesktop);
Offset.QuadPart = 0; Offset.QuadPart = 0;
Status = MmMapViewOfSection(DesktopObject->DesktopHeapSection, Status = MmMapViewOfSection(DesktopObject->hsectionDesktop,
PsGetCurrentProcess(), PsGetCurrentProcess(),
&UserBase, &UserBase,
0, 0,

View file

@ -117,6 +117,9 @@ IntAddHook(PETHREAD Thread, int HookId, BOOLEAN Global, PWINSTATION_OBJECT WinSt
if (W32Thread->pClientInfo) if (W32Thread->pClientInfo)
W32Thread->pClientInfo->fsHooks = W32Thread->fsHooks; W32Thread->pClientInfo->fsHooks = W32Thread->fsHooks;
if (W32Thread->pDeskInfo) // Do this for now.
W32Thread->pDeskInfo->fsHooks= W32Thread->fsHooks;
Hook->head.pti = W32Thread; Hook->head.pti = W32Thread;
Hook->head.rpdesk = W32Thread->Desktop; Hook->head.rpdesk = W32Thread->Desktop;
} }
@ -238,6 +241,9 @@ IntRemoveHook(PHOOK Hook, PWINSTATION_OBJECT WinStaObj, BOOL TableAlreadyLocked)
GetWin32ClientInfo()->fsHooks = W32Thread->fsHooks; GetWin32ClientInfo()->fsHooks = W32Thread->fsHooks;
if (W32Thread->pDeskInfo) // Do this for now.
W32Thread->pDeskInfo->fsHooks= W32Thread->fsHooks;
if (0 != Table->Counts[HOOKID_TO_INDEX(Hook->HookId)]) if (0 != Table->Counts[HOOKID_TO_INDEX(Hook->HookId)])
{ {
Hook->Proc = NULL; /* chain is in use, just mark it and return */ Hook->Proc = NULL; /* chain is in use, just mark it and return */

View file

@ -1844,7 +1844,7 @@ AllocErr:
{ {
/* If there is no desktop window yet, we must be creating it */ /* If there is no desktop window yet, we must be creating it */
pti->Desktop->DesktopWindow = hWnd; pti->Desktop->DesktopWindow = hWnd;
pti->Desktop->pDeskInfo->Wnd = Wnd; pti->Desktop->pDeskInfo->spwnd = Wnd;
} }
/* /*