From eb378e4c86c6e6375c689ee094284b78c9c85fab Mon Sep 17 00:00:00 2001 From: Giannis Adamopoulos Date: Sun, 21 Aug 2011 13:37:23 +0000 Subject: [PATCH] [win32k] - Add one more debug channel to trace EVERY message that is sent to user mode - Add some more traces here and there svn path=/trunk/; revision=53355 --- reactos/subsystems/win32/win32k/include/win32kdebug.h | 1 + reactos/subsystems/win32/win32k/ntuser/callback.c | 2 ++ reactos/subsystems/win32/win32k/ntuser/focus.c | 10 ++++++---- reactos/subsystems/win32/win32k/ntuser/message.c | 2 ++ reactos/subsystems/win32/win32k/objects/gdidbg.c | 1 + 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/reactos/subsystems/win32/win32k/include/win32kdebug.h b/reactos/subsystems/win32/win32k/include/win32kdebug.h index fed5af164b3..8831bd37569 100644 --- a/reactos/subsystems/win32/win32k/include/win32kdebug.h +++ b/reactos/subsystems/win32/win32k/include/win32kdebug.h @@ -97,6 +97,7 @@ DbgChUserMisc, DbgChUserMonitor, DbgChUserMsg, + DbgChUserMsgCall, DbgChUserMsgQ, DbgChUserObj, DbgChUserPainting, diff --git a/reactos/subsystems/win32/win32k/ntuser/callback.c b/reactos/subsystems/win32/win32k/ntuser/callback.c index 9871950af10..861b29b4725 100644 --- a/reactos/subsystems/win32/win32k/ntuser/callback.c +++ b/reactos/subsystems/win32/win32k/ntuser/callback.c @@ -203,6 +203,8 @@ co_IntCallWindowProc(WNDPROC Proc, IntSetTebWndCallback (&Wnd, &pWnd); + TRACE_CH(UserMsgCall,"hwnd:0x%x, msg:%d, wparam:%d, lparam:%d\n", Wnd, Message, wParam, lParam); + UserLeaveCo(); Status = KeUserModeCallback(USER32_CALLBACK_WINDOWPROC, diff --git a/reactos/subsystems/win32/win32k/ntuser/focus.c b/reactos/subsystems/win32/win32k/ntuser/focus.c index e2bb1be0c26..a4d4373419b 100644 --- a/reactos/subsystems/win32/win32k/ntuser/focus.c +++ b/reactos/subsystems/win32/win32k/ntuser/focus.c @@ -164,8 +164,9 @@ co_IntSendKillFocusMessages(HWND hWndPrev, HWND hWnd) { if (hWndPrev) { + TRACE("sending WM_KILLFOCUS to hwnd 0x%x\n", hWndPrev); IntNotifyWinEvent(EVENT_OBJECT_FOCUS, NULL, OBJID_CLIENT, CHILDID_SELF, 0); - co_IntPostOrSendMessage(hWndPrev, WM_KILLFOCUS, (WPARAM)hWnd, 0); + co_IntSendMessage(hWndPrev, WM_KILLFOCUS, (WPARAM)hWnd, 0); } } @@ -176,7 +177,7 @@ co_IntSendSetFocusMessages(HWND hWndPrev, HWND hWnd) { PWND pWnd = UserGetWindowObject(hWnd); IntNotifyWinEvent(EVENT_OBJECT_FOCUS, pWnd, OBJID_CLIENT, CHILDID_SELF, 0); - co_IntPostOrSendMessage(hWnd, WM_SETFOCUS, (WPARAM)hWndPrev, 0); + co_IntSendMessage(hWnd, WM_SETFOCUS, (WPARAM)hWndPrev, 0); } } @@ -402,13 +403,14 @@ co_IntSetFocusWindow(PWND Window OPTIONAL) return 0; } ThreadQueue->FocusWindow = Window->head.h; - TRACE("Focus: %d -> %d\n", hWndPrev, Window->head.h); + TRACE("Focus: 0x%x -> 0x%x\n", hWndPrev, Window->head.h); co_IntSendKillFocusMessages(hWndPrev, Window->head.h); co_IntSendSetFocusMessages(hWndPrev, Window->head.h); } else { + TRACE("Focus: 0x%x -> 0x%x\n", hWndPrev, 0); ThreadQueue->FocusWindow = 0; if (co_HOOK_CallHooks( WH_CBT, HCBT_SETFOCUS, (WPARAM)0, (LPARAM)hWndPrev)) { @@ -697,7 +699,7 @@ NtUserSetFocus(HWND hWnd) DECLARE_RETURN(HWND); HWND ret; - TRACE("Enter NtUserSetFocus(%x)\n", hWnd); + TRACE("Enter NtUserSetFocus(0x%x)\n", hWnd); UserEnterExclusive(); if (hWnd) diff --git a/reactos/subsystems/win32/win32k/ntuser/message.c b/reactos/subsystems/win32/win32k/ntuser/message.c index 24fc3358c93..099466862bf 100644 --- a/reactos/subsystems/win32/win32k/ntuser/message.c +++ b/reactos/subsystems/win32/win32k/ntuser/message.c @@ -1182,6 +1182,7 @@ co_IntSendMessageTimeoutSingle( HWND hWnd, if (!(Window = UserGetWindowObject(hWnd))) { + ERR("UserGetWindowObject filed!\n"); RETURN( FALSE); } @@ -1196,6 +1197,7 @@ co_IntSendMessageTimeoutSingle( HWND hWnd, { if (Win32Thread->TIF_flags & TIF_INCLEANUP) { + ERR("Trying to send message to a thread in cleanup\n"); /* Never send messages to exiting threads */ RETURN( FALSE); } diff --git a/reactos/subsystems/win32/win32k/objects/gdidbg.c b/reactos/subsystems/win32/win32k/objects/gdidbg.c index 54b711faf61..0d26ef42584 100644 --- a/reactos/subsystems/win32/win32k/objects/gdidbg.c +++ b/reactos/subsystems/win32/win32k/objects/gdidbg.c @@ -78,6 +78,7 @@ DBG_CHANNEL DbgChannels[DbgChCount]={ {L"UserMisc", DbgChUserMisc}, {L"UserMonitor", DbgChUserMonitor}, {L"UserMsg", DbgChUserMsg}, + {L"UserMsgCall", DbgChUserMsgCall}, {L"UserMsgQ", DbgChUserMsgQ}, {L"UserObj", DbgChUserObj}, {L"UserPainting", DbgChUserPainting}, -- 2.17.1