- 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
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);
#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)
HANDLE hEventQueueClient;
PKEVENT pEventQueueServer;
LIST_ENTRY PtiLink;
+ POINT ptLast;
CLIENTTHREADINFO cti; // Used only when no Desktop or pcti NULL.
/* ReactOS */
{
if (pMsg->message == WM_TIMER)
{
- if (ValidateTimerCallback(PsGetCurrentThreadWin32Thread(),Window,pMsg->wParam,pMsg->lParam))
+ if (ValidateTimerCallback(PsGetCurrentThreadWin32Thread(),pMsg->lParam))
{
KeQueryTickCount(&TickCount);
Time = MsqCalculateMessageTime(&TickCount);
}
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))
{
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;
}
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;
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
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_);