Author: jimtabor
Date: Tue Oct 6 05:38:23 2009
New Revision: 43309
URL:
http://svn.reactos.org/svn/reactos?rev=43309&view=rev
Log:
- Set Process, pass keyboard handle and enable check for user hooks.
Modified:
trunk/reactos/dll/win32/user32/include/user32.h
trunk/reactos/dll/win32/user32/include/user32p.h
trunk/reactos/dll/win32/user32/windows/defwnd.c
trunk/reactos/subsystems/win32/win32k/main/dllmain.c
trunk/reactos/subsystems/win32/win32k/ntuser/misc.c
Modified: trunk/reactos/dll/win32/user32/include/user32.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/u…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/user32.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/include/user32.h [iso-8859-1] Tue Oct 6 05:38:23 2009
@@ -41,6 +41,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
Modified: trunk/reactos/dll/win32/user32/include/user32p.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/u…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/user32p.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/include/user32p.h [iso-8859-1] Tue Oct 6 05:38:23
2009
@@ -121,7 +121,6 @@
typedef struct _USER32_THREAD_DATA
{
MSG LastMessage;
- HKL KeyboardLayoutHandle;
USER32_TRACKINGLIST tracking_info; /* TrackMouseEvent stuff */
} USER32_THREAD_DATA, *PUSER32_THREAD_DATA;
Modified: trunk/reactos/dll/win32/user32/windows/defwnd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/d…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/defwnd.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/defwnd.c [iso-8859-1] Tue Oct 6 05:38:23 2009
@@ -667,14 +667,14 @@
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 @@
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:
Modified: trunk/reactos/subsystems/win32/win32k/main/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ma…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/main/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/main/dllmain.c [iso-8859-1] Tue Oct 6 05:38:23
2009
@@ -129,6 +129,7 @@
Process->Peb->GdiDCAttributeList = GDI_BATCH_LIMIT;
}
+ Win32Process->peProcess = Process;
/* setup process flags */
Win32Process->W32PF_flags = 0;
}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] Tue Oct 6 05:38:23
2009
@@ -492,6 +492,7 @@
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)
{