From 9aa489b9bf401a07d58329634468a9edaffc2fe6 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Thu, 25 Dec 2003 12:26:35 +0000 Subject: [PATCH] Fixed double clicks. svn path=/trunk/; revision=7231 --- reactos/subsys/win32k/ntuser/msgqueue.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/reactos/subsys/win32k/ntuser/msgqueue.c b/reactos/subsys/win32k/ntuser/msgqueue.c index 229baac7e24..9c900cdf8a6 100644 --- a/reactos/subsys/win32k/ntuser/msgqueue.c +++ b/reactos/subsys/win32k/ntuser/msgqueue.c @@ -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.56 2003/12/21 21:21:33 weiden Exp $ +/* $Id: msgqueue.c,v 1.57 2003/12/25 12:26:35 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -198,7 +198,7 @@ MsqIsDblClk(PWINDOW_OBJECT Window, PUSER_MESSAGE Message, BOOL Remove) return FALSE; } CurInfo = &WinStaObject->SystemCursor; - Res = (Window->Self == (HWND)CurInfo->LastClkWnd) && + Res = (Message->Msg.hwnd == (HWND)CurInfo->LastClkWnd) && ((Message->Msg.time - CurInfo->LastBtnDown) < CurInfo->DblClickSpeed); if(Res) { @@ -213,20 +213,10 @@ MsqIsDblClk(PWINDOW_OBJECT Window, PUSER_MESSAGE Message, BOOL Remove) if(Remove) { - if(Res) - { - CurInfo->LastBtnDown = 0; - CurInfo->LastBtnDownX = Message->Msg.pt.x; - CurInfo->LastBtnDownY = Message->Msg.pt.y; - CurInfo->LastClkWnd = NULL; - } - else - { - CurInfo->LastBtnDownX = Message->Msg.pt.x; - CurInfo->LastBtnDownY = Message->Msg.pt.y; - CurInfo->LastClkWnd = (HANDLE)Message->Msg.hwnd; - CurInfo->LastBtnDown = Message->Msg.time; - } + CurInfo->LastBtnDown = 0; + CurInfo->LastBtnDownX = Message->Msg.pt.x; + CurInfo->LastBtnDownY = Message->Msg.pt.y; + CurInfo->LastClkWnd = NULL; } } else