1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-03-12 18:13:50 -05:00

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]
This commit is contained in:
Simon Tatham 2001-12-29 14:05:07 +00:00
parent df00590b43
commit 7423036505

View File

@ -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;