From 39cc1fbc233f049bb918436d1269448f7d2eb7d7 Mon Sep 17 00:00:00 2001 From: James Crook Date: Mon, 21 Sep 2015 23:11:55 +0100 Subject: [PATCH] Bug 1204 - Crash when pressing both mouse buttons over toolbar buttons Looks a very safe fix. Post 2.1.2 should review ALL uses of CaptureMouse(). --- src/widgets/AButton.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/widgets/AButton.cpp b/src/widgets/AButton.cpp index 165b6d144..d9dc8c169 100644 --- a/src/widgets/AButton.cpp +++ b/src/widgets/AButton.cpp @@ -405,7 +405,8 @@ void AButton::OnMouseEvent(wxMouseEvent & event) if (mEnabled && event.IsButton()) { if (event.ButtonIsDown(wxMOUSE_BTN_ANY)) { mIsClicking = true; - CaptureMouse(); + if( !HasCapture() ) + CaptureMouse(); } else if (mIsClicking) { mIsClicking = false;