mirror of
https://github.com/reactos/reactos.git
synced 2025-07-28 11:31:54 +00:00
[WIN32K]
- co_IntTranslateMouseMessage: properly initialize *HitTest and only send WM_NCHITTEST when the message is going to be removed - co_IntPeekMessage: Prevent possible use of uninitialized HitTest by ProcessMouseMessage() - Patch by Jan Roeloffzen [jroeloffzen at hotmail dot com] - Fixes bug 2139 svn path=/trunk/; revision=48576
This commit is contained in:
parent
ca4003c9f8
commit
02cb45ab9c
1 changed files with 10 additions and 6 deletions
|
@ -579,14 +579,20 @@ co_IntTranslateMouseMessage(
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
*HitTest = HTCLIENT;
|
||||
|
||||
UserRefObjectCo(Window, &Ref);
|
||||
|
||||
if ( ThreadQueue == Window->pti->MessageQueue &&
|
||||
ThreadQueue->CaptureWindow != Window->hSelf)
|
||||
{
|
||||
/* only send WM_NCHITTEST messages if we're not capturing the window! */
|
||||
*HitTest = co_IntSendMessage(Window->hSelf, WM_NCHITTEST, 0,
|
||||
MAKELONG(Msg->pt.x, Msg->pt.y));
|
||||
if (Remove )
|
||||
{
|
||||
*HitTest = co_IntSendMessage(Window->hSelf, WM_NCHITTEST, 0,
|
||||
MAKELONG(Msg->pt.x, Msg->pt.y));
|
||||
}
|
||||
/* else we are going to see this message again, but then with Remove == TRUE */
|
||||
|
||||
if (*HitTest == (USHORT)HTTRANSPARENT)
|
||||
{
|
||||
|
@ -626,10 +632,6 @@ co_IntTranslateMouseMessage(
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
*HitTest = HTCLIENT;
|
||||
}
|
||||
|
||||
if ( gspv.bMouseClickLock &&
|
||||
( (Msg->message == WM_LBUTTONUP) ||
|
||||
|
@ -801,6 +803,8 @@ co_IntPeekMessage( PUSER_MESSAGE Msg,
|
|||
*/
|
||||
CheckMessages:
|
||||
|
||||
HitTest = HTNOWHERE;
|
||||
|
||||
Present = FALSE;
|
||||
|
||||
KeQueryTickCount(&LargeTickCount);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue