From: Stefan Csomor Date: Fri, 25 Jun 2004 08:25:34 +0000 (+0000) Subject: fix missing mouse-up events (eg when track control was called, which is consuming... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4e4e6dce5b7188f885c1ce5cce056f685c9c0978?ds=inline fix missing mouse-up events (eg when track control was called, which is consuming the mouse-up event) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index afeecbafc4..1b89824fa7 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -283,6 +283,9 @@ static void SetupMouseEvent( wxMouseEvent &wxevent , wxMacCarbonEvent &cEvent ) if ( cEvent.GetKind() == kEventMouseDown ) lastButton = button ; + + if ( button == 0 ) + lastButton = 0 ; else if ( lastButton ) button = lastButton ; @@ -338,8 +341,6 @@ static void SetupMouseEvent( wxMouseEvent &wxevent , wxMacCarbonEvent &cEvent ) else wxevent.SetEventType(wxEVT_MOTION ) ; } - if ( cEvent.GetKind() == kEventMouseUp ) - lastButton = 0 ; } ControlRef wxMacFindSubControl( Point location , ControlRef superControl , ControlPartCode *outPart )