- Fixed ValidateTimerCallback, always returning true and just spinning in the loop.
- Add one more process information flag with a point type and capturing the hit test in desktop structure.

svn path=/trunk/; revision=48970
This commit is contained in:
James Tabor 2010-10-03 19:18:19 +00:00
parent e14624d8ca
commit aea07215a8
5 changed files with 19 additions and 26 deletions

View file

@ -32,7 +32,7 @@ BOOL FASTCALL DestroyTimersForWindow(PTHREADINFO pti, PWINDOW_OBJECT Window);
BOOL FASTCALL IntKillTimer(PWINDOW_OBJECT Window, UINT_PTR IDEvent, BOOL SystemTimer);
UINT_PTR FASTCALL IntSetTimer(PWINDOW_OBJECT Window, UINT_PTR IDEvent, UINT Elapse, TIMERPROC TimerFunc, INT Type);
PTIMER FASTCALL FindSystemTimer(PMSG);
BOOL FASTCALL ValidateTimerCallback(PTHREADINFO,PWINDOW_OBJECT,WPARAM,LPARAM);
BOOL FASTCALL ValidateTimerCallback(PTHREADINFO,LPARAM);
VOID CALLBACK SystemTimerProc(HWND,UINT,UINT_PTR,DWORD);
UINT_PTR FASTCALL SystemTimerSet(PWINDOW_OBJECT,UINT_PTR,UINT,TIMERPROC);
BOOL FASTCALL PostTimerMessages(PWINDOW_OBJECT);

View file

@ -25,6 +25,7 @@
#define W32PF_SCREENSAVER 0x00200000
#define W32PF_IDLESCREENSAVER 0x00400000
#define W32PF_ICONTITLEREGISTERED 0x10000000
#define W32PF_DPIAWARE 0x20000000
// ReactOS
#define W32PF_NOWINDOWGHOSTING (0x01000000)
#define W32PF_MANUALGUICHECK (0x02000000)
@ -93,6 +94,7 @@ typedef struct _THREADINFO
HANDLE hEventQueueClient;
PKEVENT pEventQueueServer;
LIST_ENTRY PtiLink;
POINT ptLast;
CLIENTTHREADINFO cti; // Used only when no Desktop or pcti NULL.
/* ReactOS */

View file

@ -394,7 +394,7 @@ IntDispatchMessage(PMSG pMsg)
{
if (pMsg->message == WM_TIMER)
{
if (ValidateTimerCallback(PsGetCurrentThreadWin32Thread(),Window,pMsg->wParam,pMsg->lParam))
if (ValidateTimerCallback(PsGetCurrentThreadWin32Thread(),pMsg->lParam))
{
KeQueryTickCount(&TickCount);
Time = MsqCalculateMessageTime(&TickCount);
@ -963,13 +963,15 @@ MessageFound:
}
MsgExit:
pti->rpdesk->htEx = HitTest; /* Now set the capture hit. */
if ( ISITHOOKED(WH_MOUSE) && IS_MOUSE_MESSAGE(Msg->Msg.message))
{
if(!ProcessMouseMessage(&Msg->Msg, HitTest, RemoveMsg))
{
return FALSE;
}
}
if (!ProcessMouseMessage(&Msg->Msg, HitTest, RemoveMsg))
{
return FALSE;
}
}
if ( ISITHOOKED(WH_KEYBOARD) && IS_KBD_MESSAGE(Msg->Msg.message))
{

View file

@ -1125,20 +1125,11 @@ NtUserValidateTimerCallback(
LPARAM lParam)
{
BOOL Ret = FALSE;
PWINDOW_OBJECT Window = NULL;
UserEnterShared();
if (hWnd)
{
Window = UserGetWindowObject(hWnd);
if (!Window || !Window->Wnd)
goto Exit;
}
Ret = ValidateTimerCallback(PsGetCurrentThreadWin32Thread(), lParam);
Ret = ValidateTimerCallback(PsGetCurrentThreadWin32Thread(), Window, wParam, lParam);
Exit:
UserLeave();
return Ret;
}

View file

@ -167,11 +167,10 @@ FindSystemTimer(PMSG pMsg)
BOOL
FASTCALL
ValidateTimerCallback(PTHREADINFO pti,
PWINDOW_OBJECT Window,
WPARAM wParam,
LPARAM lParam)
{
PLIST_ENTRY pLE;
BOOL Ret = FALSE;
PTIMER pTmr = FirstpTmr;
if (!pTmr) return FALSE;
@ -180,18 +179,18 @@ ValidateTimerCallback(PTHREADINFO pti,
do
{
if ( (lParam == (LPARAM)pTmr->pfn) &&
(pTmr->flags & (TMRF_SYSTEM|TMRF_RIT)) &&
!(pTmr->flags & (TMRF_SYSTEM|TMRF_RIT)) &&
(pTmr->pti->ppi == pti->ppi) )
{
Ret = TRUE;
break;
}
pLE = pTmr->ptmrList.Flink;
pTmr = CONTAINING_RECORD(pLE, TIMER, ptmrList);
} while (pTmr != FirstpTmr);
TimerLeave();
if (!pTmr) return FALSE;
return TRUE;
return Ret;
}
UINT_PTR FASTCALL
@ -616,8 +615,7 @@ NtUserSetSystemTimer(
DPRINT("Enter NtUserSetSystemTimer\n");
// This is wrong, lpTimerFunc is NULL!
RETURN(IntSetTimer(UserGetWindowObject(hWnd), nIDEvent, uElapse, lpTimerFunc, TMRF_SYSTEM));
RETURN(IntSetTimer(UserGetWindowObject(hWnd), nIDEvent, uElapse, NULL, TMRF_SYSTEM));
CLEANUP:
DPRINT("Leave NtUserSetSystemTimer, ret=%i\n", _ret_);