- Set Process, pass keyboard handle and enable check for user hooks.

svn path=/trunk/; revision=43309
This commit is contained in:
James Tabor 2009-10-06 03:38:23 +00:00
parent b63d2987f3
commit 6d29703714
5 changed files with 10 additions and 7 deletions

View file

@ -42,6 +42,9 @@
/* SEH Support with PSEH */
#include <pseh/pseh2.h>
#define HOOKID_TO_FLAG(HookId) (1 << ((HookId) + 1))
#define ISITHOOKED(HookId) (GetWin32ClientInfo()->fsHooks & HOOKID_TO_FLAG(HookId))
/* Temporarily in here for now. */
typedef struct _USERAPIHOOKINFO
{

View file

@ -121,7 +121,6 @@ typedef struct _USER32_TRACKINGLIST {
typedef struct _USER32_THREAD_DATA
{
MSG LastMessage;
HKL KeyboardLayoutHandle;
USER32_TRACKINGLIST tracking_info; /* TrackMouseEvent stuff */
} USER32_THREAD_DATA, *PUSER32_THREAD_DATA;

View file

@ -667,14 +667,14 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam)
DeleteObject(DesktopRgn);
}
}
//#if 0
// if (ISITHOOKED(WH_CBT))
if (ISITHOOKED(WH_CBT))
{
LRESULT lResult;
NtUserMessageCall( hwnd, WM_CBT, HCBT_MOVESIZE, (LPARAM)&sizingRect, (ULONG_PTR)&lResult, FNID_DEFWINDOWPROC, FALSE);
if (lResult) moved = FALSE;
}
//#endif
(void)NtUserSetGUIThreadHandle(MSQ_STATE_MOVESIZE, NULL);
SendMessageA( hwnd, WM_EXITSIZEMOVE, 0, 0 );
SendMessageA( hwnd, WM_SETVISIBLE, !IsIconic(hwnd), 0L);
@ -756,14 +756,13 @@ DefWndHandleSysCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
if (!IsWindowEnabled( hWnd )) return 0;
//#if 0
// if (ISITHOOKED(WH_CBT))
if (ISITHOOKED(WH_CBT))
{
LRESULT lResult;
NtUserMessageCall( hWnd, WM_SYSCOMMAND, wParam, lParam, (ULONG_PTR)&lResult, FNID_DEFWINDOWPROC, FALSE);
if (lResult) return 0;
}
//#endif
switch (wParam & 0xfff0)
{
case SC_MOVE:

View file

@ -129,6 +129,7 @@ Win32kProcessCallback(struct _EPROCESS *Process,
Process->Peb->GdiDCAttributeList = GDI_BATCH_LIMIT;
}
Win32Process->peProcess = Process;
/* setup process flags */
Win32Process->W32PF_flags = 0;
}

View file

@ -492,6 +492,7 @@ GetW32ThreadInfo(VOID)
pci->pClientThreadInfo = NULL; // FIXME Need to set it in desktop.c!
pci->ppi = ppi;
pci->fsHooks = pti->fsHooks;
pci->hKL = pti->KeyboardLayout->hkl;
/* CI may not have been initialized. */
if (!pci->pDeskInfo && pti->pDeskInfo)
{