mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 11:51:58 +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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*HitTest = HTCLIENT;
|
||||||
|
|
||||||
UserRefObjectCo(Window, &Ref);
|
UserRefObjectCo(Window, &Ref);
|
||||||
|
|
||||||
if ( ThreadQueue == Window->pti->MessageQueue &&
|
if ( ThreadQueue == Window->pti->MessageQueue &&
|
||||||
ThreadQueue->CaptureWindow != Window->hSelf)
|
ThreadQueue->CaptureWindow != Window->hSelf)
|
||||||
{
|
{
|
||||||
/* only send WM_NCHITTEST messages if we're not capturing the window! */
|
/* only send WM_NCHITTEST messages if we're not capturing the window! */
|
||||||
|
if (Remove )
|
||||||
|
{
|
||||||
*HitTest = co_IntSendMessage(Window->hSelf, WM_NCHITTEST, 0,
|
*HitTest = co_IntSendMessage(Window->hSelf, WM_NCHITTEST, 0,
|
||||||
MAKELONG(Msg->pt.x, Msg->pt.y));
|
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)
|
if (*HitTest == (USHORT)HTTRANSPARENT)
|
||||||
{
|
{
|
||||||
|
@ -626,10 +632,6 @@ co_IntTranslateMouseMessage(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
*HitTest = HTCLIENT;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( gspv.bMouseClickLock &&
|
if ( gspv.bMouseClickLock &&
|
||||||
( (Msg->message == WM_LBUTTONUP) ||
|
( (Msg->message == WM_LBUTTONUP) ||
|
||||||
|
@ -801,6 +803,8 @@ co_IntPeekMessage( PUSER_MESSAGE Msg,
|
||||||
*/
|
*/
|
||||||
CheckMessages:
|
CheckMessages:
|
||||||
|
|
||||||
|
HitTest = HTNOWHERE;
|
||||||
|
|
||||||
Present = FALSE;
|
Present = FALSE;
|
||||||
|
|
||||||
KeQueryTickCount(&LargeTickCount);
|
KeQueryTickCount(&LargeTickCount);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue