X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23645bfa01b6450257f140a30c87565225b1ef4a..67e2efca87e3d3142ca545d9855748da15eac894:/src/univ/button.cpp?ds=inline diff --git a/src/univ/button.cpp b/src/univ/button.cpp index fe2cedc46d..eaf7fea91b 100644 --- a/src/univ/button.cpp +++ b/src/univ/button.cpp @@ -45,7 +45,7 @@ // ---------------------------------------------------------------------------- // default margins around the image -static const wxCoord DEFAULT_BTN_MARGIN_X = 0; +static const wxCoord DEFAULT_BTN_MARGIN_X = 0; // We should give space for the border, at least. static const wxCoord DEFAULT_BTN_MARGIN_Y = 0; // ============================================================================ @@ -286,7 +286,7 @@ bool wxStdButtonInputHandler::HandleMouse(wxInputConsumer *consumer, // the other mouse buttons are ignored if ( event.Button(1) ) { - if ( event.ButtonDown(1) ) + if ( event.LeftDown() || event.LeftDClick() ) { m_winCapture = consumer->GetInputWindow(); m_winCapture->CaptureMouse(); @@ -296,7 +296,7 @@ bool wxStdButtonInputHandler::HandleMouse(wxInputConsumer *consumer, return TRUE; } - else // up + else if ( event.LeftUp() ) { if ( m_winCapture ) { @@ -314,6 +314,7 @@ bool wxStdButtonInputHandler::HandleMouse(wxInputConsumer *consumer, //else: the mouse was released outside the window, this doesn't // count as a click } + //else: don't do anything special about the double click } return wxStdInputHandler::HandleMouse(consumer, event);