mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 12:24:21 +00:00
fixed handling of WM_MOUSEWHEEL which are supposed to be sent to the window with the current focus no matter where the mouse cursor is
svn path=/trunk/; revision=6182
This commit is contained in:
parent
59760bf0d0
commit
bbe43cc970
1 changed files with 80 additions and 64 deletions
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: msgqueue.c,v 1.23 2003/09/28 00:26:13 weiden Exp $
|
||||
/* $Id: msgqueue.c,v 1.24 2003/09/28 14:21:26 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -176,6 +176,10 @@ MsqTranslateMouseMessage(HWND hWnd, UINT FilterLow, UINT FilterHigh,
|
|||
PWINDOW_OBJECT Window;
|
||||
POINT Point;
|
||||
|
||||
if(Msg != WM_MOUSEWHEEL)
|
||||
{
|
||||
/* WM_MOUSEWHEEL messages ignore the position of the mouse cursor */
|
||||
|
||||
if ((Window = IntGetCaptureWindow()) == NULL)
|
||||
{
|
||||
*HitTest = WinPosWindowFromPoint(ScopeWin, Message->Msg.pt, &Window);
|
||||
|
@ -229,8 +233,6 @@ MsqTranslateMouseMessage(HWND hWnd, UINT FilterLow, UINT FilterHigh,
|
|||
{
|
||||
switch(Msg)
|
||||
{
|
||||
case WM_MOUSEWHEEL:
|
||||
break;
|
||||
case WM_XBUTTONDOWN:
|
||||
case WM_XBUTTONUP:
|
||||
case WM_XBUTTONDBLCLK:
|
||||
|
@ -242,19 +244,33 @@ MsqTranslateMouseMessage(HWND hWnd, UINT FilterLow, UINT FilterHigh,
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(Msg != WM_MOUSEWHEEL)
|
||||
{
|
||||
Point.x -= Window->ClientRect.left;
|
||||
Point.y -= Window->ClientRect.top;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* FIXME: Check message filter. */
|
||||
|
||||
if (Remove)
|
||||
{
|
||||
if(Msg == WM_MOUSEWHEEL)
|
||||
{
|
||||
/* WM_MOUSEWHEEL messages are sent to the window with the current focus */
|
||||
Message->Msg.hwnd = IntGetFocusWindow();
|
||||
if(Message->Msg.hwnd == 0)
|
||||
{
|
||||
ExFreePool(Message);
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
*ScreenPoint = Message->Msg.pt;
|
||||
Point = Message->Msg.pt;
|
||||
}
|
||||
else
|
||||
Message->Msg.hwnd = Window->Self;
|
||||
|
||||
Message->Msg.message = Msg;
|
||||
Message->Msg.lParam = MAKELONG(Point.x, Point.y);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue