mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
fixed WindowFromPoint() to send WM_NCHITTEST messages to windows that belong to the current process.
svn path=/trunk/; revision=8352
This commit is contained in:
parent
e7282af976
commit
aec334c343
4 changed files with 14 additions and 14 deletions
|
@ -20,7 +20,7 @@ WinPosSetWindowPos(HWND Wnd, HWND WndInsertAfter, INT x, INT y, INT cx,
|
|||
BOOLEAN FASTCALL
|
||||
WinPosShowWindow(HWND Wnd, INT Cmd);
|
||||
USHORT FASTCALL
|
||||
WinPosWindowFromPoint(PWINDOW_OBJECT ScopeWin, POINT *WinPoint,
|
||||
WinPosWindowFromPoint(PWINDOW_OBJECT ScopeWin, BOOL SendProcHitTests, POINT *WinPoint,
|
||||
PWINDOW_OBJECT* Window);
|
||||
VOID FASTCALL WinPosActivateOtherWindow(PWINDOW_OBJECT Window);
|
||||
|
||||
|
|
|
@ -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.71 2004/02/24 13:27:03 weiden Exp $
|
||||
/* $Id: msgqueue.c,v 1.72 2004/02/24 15:56:52 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -255,9 +255,7 @@ MsqTranslateMouseMessage(HWND hWnd, UINT FilterLow, UINT FilterHigh,
|
|||
Msg == WM_RBUTTONDOWN ||
|
||||
Msg == WM_XBUTTONDOWN)
|
||||
{
|
||||
USHORT Hit = WinPosWindowFromPoint(ScopeWin,
|
||||
&Message->Msg.pt,
|
||||
&Window);
|
||||
USHORT Hit = WinPosWindowFromPoint(ScopeWin, FALSE, &Message->Msg.pt, &Window);
|
||||
/*
|
||||
**Make sure that we have a window that is not already in focus
|
||||
*/
|
||||
|
@ -315,7 +313,7 @@ MsqTranslateMouseMessage(HWND hWnd, UINT FilterLow, UINT FilterHigh,
|
|||
}
|
||||
else
|
||||
{
|
||||
*HitTest = WinPosWindowFromPoint(ScopeWin, &Message->Msg.pt, &Window);
|
||||
*HitTest = WinPosWindowFromPoint(ScopeWin, FALSE, &Message->Msg.pt, &Window);
|
||||
if(!Window)
|
||||
{
|
||||
/* change the cursor on desktop background */
|
||||
|
|
|
@ -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: window.c,v 1.192 2004/02/24 13:27:03 weiden Exp $
|
||||
/* $Id: window.c,v 1.193 2004/02/24 15:56:52 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -3373,7 +3373,7 @@ NtUserWindowFromPoint(LONG X, LONG Y)
|
|||
pt.x = X;
|
||||
pt.y = Y;
|
||||
|
||||
Hit = WinPosWindowFromPoint(DesktopWindow, &pt, &Window);
|
||||
Hit = WinPosWindowFromPoint(DesktopWindow, TRUE, &pt, &Window);
|
||||
|
||||
if(Window)
|
||||
{
|
||||
|
|
|
@ -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: winpos.c,v 1.99 2004/02/24 13:27:03 weiden Exp $
|
||||
/* $Id: winpos.c,v 1.100 2004/02/24 15:56:53 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -1277,7 +1277,7 @@ WinPosShowWindow(HWND Wnd, INT Cmd)
|
|||
}
|
||||
|
||||
BOOL STATIC FASTCALL
|
||||
WinPosSearchChildren(PWINDOW_OBJECT ScopeWin, POINT *Point,
|
||||
WinPosSearchChildren(PWINDOW_OBJECT ScopeWin, BOOL SendProcHitTests, POINT *Point,
|
||||
PWINDOW_OBJECT* Window, USHORT *HitTest)
|
||||
{
|
||||
PWINDOW_OBJECT Current;
|
||||
|
@ -1314,7 +1314,9 @@ WinPosSearchChildren(PWINDOW_OBJECT ScopeWin, POINT *Point,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
if(Current->MessageQueue == PsGetWin32Thread()->MessageQueue)
|
||||
if((SendProcHitTests &&
|
||||
(Current->OwnerThread->ThreadsProcess == PsGetCurrentProcess())) ||
|
||||
(Current->MessageQueue == PsGetWin32Thread()->MessageQueue))
|
||||
{
|
||||
*HitTest = IntSendMessage(Current->Self, WM_NCHITTEST, 0,
|
||||
MAKELONG(Point->x, Point->y));
|
||||
|
@ -1334,7 +1336,7 @@ WinPosSearchChildren(PWINDOW_OBJECT ScopeWin, POINT *Point,
|
|||
Point->y < Current->ClientRect.bottom)
|
||||
{
|
||||
USHORT ChildHitTest;
|
||||
if(WinPosSearchChildren(Current, Point, Window, &ChildHitTest))
|
||||
if(WinPosSearchChildren(Current, SendProcHitTests, Point, Window, &ChildHitTest))
|
||||
{
|
||||
*HitTest = ChildHitTest;
|
||||
ExFreePool(List);
|
||||
|
@ -1357,7 +1359,7 @@ WinPosSearchChildren(PWINDOW_OBJECT ScopeWin, POINT *Point,
|
|||
}
|
||||
|
||||
USHORT FASTCALL
|
||||
WinPosWindowFromPoint(PWINDOW_OBJECT ScopeWin, POINT *WinPoint,
|
||||
WinPosWindowFromPoint(PWINDOW_OBJECT ScopeWin, BOOL SendProcHitTests, POINT *WinPoint,
|
||||
PWINDOW_OBJECT* Window)
|
||||
{
|
||||
HWND DesktopWindowHandle;
|
||||
|
@ -1387,7 +1389,7 @@ WinPosWindowFromPoint(PWINDOW_OBJECT ScopeWin, POINT *WinPoint,
|
|||
IntReleaseWindowObject(DesktopWindow);
|
||||
}
|
||||
|
||||
if(WinPosSearchChildren(ScopeWin, &Point, Window, &HitTest))
|
||||
if(WinPosSearchChildren(ScopeWin, SendProcHitTests, &Point, Window, &HitTest))
|
||||
{
|
||||
return HitTest;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue