Commit caf18a64 authored by Alexandre Julliard's avatar Alexandre Julliard

Set remove to TRUE in accept_hardware_message for messages that should

go to a different thread. Simplify the code a bit.
parent d09c8a89
......@@ -1650,24 +1650,23 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H
GUITHREADINFO info;
MOUSEHOOKSTRUCT hook;
BOOL eatMsg;
HWND hWndScope = msg->hwnd;
/* find the window to dispatch this mouse message to */
hittest = HTCLIENT;
GetGUIThreadInfo( GetCurrentThreadId(), &info );
if (!(msg->hwnd = info.hwndCapture))
if (info.hwndCapture)
{
hittest = HTCLIENT;
msg->hwnd = info.hwndCapture;
}
else
{
/* If no capture HWND, find window which contains the mouse position.
* Also find the position of the cursor hot spot (hittest) */
if (!IsWindow(hWndScope)) hWndScope = 0;
if (!(msg->hwnd = WINPOS_WindowFromPoint( hWndScope, msg->pt, &hittest )))
msg->hwnd = GetDesktopWindow();
msg->hwnd = WINPOS_WindowFromPoint( msg->hwnd, msg->pt, &hittest );
}
if (!WIN_IsCurrentThread( msg->hwnd ))
if (!msg->hwnd || !WIN_IsCurrentThread( msg->hwnd ))
{
accept_hardware_message( hw_id, FALSE, msg->hwnd );
accept_hardware_message( hw_id, TRUE, msg->hwnd );
return FALSE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment