diff --git a/reactos/dll/win32/user32/include/user32.h b/reactos/dll/win32/user32/include/user32.h index cf38aa49a66..174d71ebb3b 100644 --- a/reactos/dll/win32/user32/include/user32.h +++ b/reactos/dll/win32/user32/include/user32.h @@ -42,6 +42,9 @@ /* SEH Support with PSEH */ #include +#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 { diff --git a/reactos/dll/win32/user32/include/user32p.h b/reactos/dll/win32/user32/include/user32p.h index 3c7fd0ca163..7e8deb8704e 100644 --- a/reactos/dll/win32/user32/include/user32p.h +++ b/reactos/dll/win32/user32/include/user32p.h @@ -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; diff --git a/reactos/dll/win32/user32/windows/defwnd.c b/reactos/dll/win32/user32/windows/defwnd.c index da545f0c33f..6892ea8d349 100644 --- a/reactos/dll/win32/user32/windows/defwnd.c +++ b/reactos/dll/win32/user32/windows/defwnd.c @@ -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: diff --git a/reactos/subsystems/win32/win32k/main/dllmain.c b/reactos/subsystems/win32/win32k/main/dllmain.c index 76640ba8681..0a02c8731b9 100644 --- a/reactos/subsystems/win32/win32k/main/dllmain.c +++ b/reactos/subsystems/win32/win32k/main/dllmain.c @@ -129,6 +129,7 @@ Win32kProcessCallback(struct _EPROCESS *Process, Process->Peb->GdiDCAttributeList = GDI_BATCH_LIMIT; } + Win32Process->peProcess = Process; /* setup process flags */ Win32Process->W32PF_flags = 0; } diff --git a/reactos/subsystems/win32/win32k/ntuser/misc.c b/reactos/subsystems/win32/win32k/ntuser/misc.c index 1085ec3b4b2..5d4d451e0f3 100644 --- a/reactos/subsystems/win32/win32k/ntuser/misc.c +++ b/reactos/subsystems/win32/win32k/ntuser/misc.c @@ -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) {