mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:03:00 +00:00
Update to add in a first attempt to send the WM_MOUSEACTIVATE message to windows when the user clicks the mouse over them.
TODO: Fix the PostMessage for WM_MOUSEACTIVATE to a SendMessage and check the return to see what to do with the origional mouse message. svn path=/trunk/; revision=6473
This commit is contained in:
parent
555931d0f4
commit
98ec124b3d
1 changed files with 34 additions and 3 deletions
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: msgqueue.c,v 1.26 2003/10/09 06:13:05 gvg Exp $
|
/* $Id: msgqueue.c,v 1.27 2003/10/30 22:03:00 mtempel Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -179,7 +179,9 @@ MsqTranslateMouseMessage(HWND hWnd, UINT FilterLow, UINT FilterHigh,
|
||||||
PWINDOW_OBJECT Window = NULL;
|
PWINDOW_OBJECT Window = NULL;
|
||||||
HWND Wnd;
|
HWND Wnd;
|
||||||
POINT Point;
|
POINT Point;
|
||||||
|
|
||||||
|
LPARAM SpareLParam;
|
||||||
|
|
||||||
/* handle WM_MOUSEWHEEL messages differently, we don't need to check where
|
/* handle WM_MOUSEWHEEL messages differently, we don't need to check where
|
||||||
the mouse cursor is, we just send it to the window with the current focus */
|
the mouse cursor is, we just send it to the window with the current focus */
|
||||||
if(Msg == WM_MOUSEWHEEL)
|
if(Msg == WM_MOUSEWHEEL)
|
||||||
|
@ -203,7 +205,36 @@ MsqTranslateMouseMessage(HWND hWnd, UINT FilterLow, UINT FilterHigh,
|
||||||
ExFreePool(Message);
|
ExFreePool(Message);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*Handle WM_XBUTTONDOWN messages differently too. We need to check to see
|
||||||
|
**if the cursor is above an inactive window.
|
||||||
|
*/
|
||||||
|
if (Msg == WM_LBUTTONDOWN ||
|
||||||
|
Msg == WM_MBUTTONDOWN ||
|
||||||
|
Msg == WM_RBUTTONDOWN )
|
||||||
|
{
|
||||||
|
*ScreenPoint = Message->Msg.pt;
|
||||||
|
Wnd = NtUserWindowFromPoint(ScreenPoint->x, ScreenPoint->y);
|
||||||
|
/*
|
||||||
|
**Make sure that we have a window that is not already in focus
|
||||||
|
*/
|
||||||
|
if (0 != Wnd && Wnd != IntGetFocusWindow())
|
||||||
|
{
|
||||||
|
DbgPrint("Changing Focus window to 0x%X\n", Wnd);
|
||||||
|
|
||||||
|
Window = IntGetWindowObject(Wnd);
|
||||||
|
SpareLParam = MAKELONG(WinPosWindowFromPoint(ScopeWin, Message->Msg.pt, &Window), Msg);
|
||||||
|
|
||||||
|
NtUserPostMessage(Wnd, WM_MOUSEACTIVATE, (WPARAM)Window->ParentHandle, (LPARAM)SpareLParam);
|
||||||
|
NtUserPostMessage(Wnd, Msg, Message->Msg.wParam, Message->Msg.lParam);
|
||||||
|
|
||||||
|
IntReleaseWindowObject(Window);
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if ((Window = IntGetCaptureWindow()) == NULL)
|
if ((Window = IntGetCaptureWindow()) == NULL)
|
||||||
{
|
{
|
||||||
*HitTest = WinPosWindowFromPoint(ScopeWin, Message->Msg.pt, &Window);
|
*HitTest = WinPosWindowFromPoint(ScopeWin, Message->Msg.pt, &Window);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue