From 7423036505911f6b34ebdb511a0e9e9fa0927696 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 29 Dec 2001 14:05:07 +0000 Subject: [PATCH] Jordan Russell's patch: only process mouse drags when we have the mouse capture, which in turn will only occur if the initial click was in the PuTTY client area. Prevents mouse drag events without an initiating click, and also prevents selection occurring at unexpected moments such as if you move the mouse before releasing the second click after double-clicking the title bar to maximise the window. [originally from svn r1515] --- window.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/window.c b/window.c index 5ea24dcf..49a7893b 100644 --- a/window.c +++ b/window.c @@ -1937,7 +1937,8 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, */ noise_ultralight(lParam); - if (wParam & (MK_LBUTTON | MK_MBUTTON | MK_RBUTTON)) { + if (wParam & (MK_LBUTTON | MK_MBUTTON | MK_RBUTTON) && + GetCapture() == hwnd) { Mouse_Button b; if (wParam & MK_LBUTTON) b = MBT_LEFT;