]> git.saurik.com Git - wxWidgets.git/commitdiff
changed FindControl to FindControlUnderMouse and use ControlRef != NULL instead of...
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 15 Sep 2001 20:39:46 +0000 (20:39 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 15 Sep 2001 20:39:46 +0000 (20:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11611 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/control.cpp
src/mac/control.cpp

index 1d23a5eaaee279e18b8dda8aa972cbf46ed9e925..d9735a9c221cbf5c57323182cd7cb0044d71f2f0 100644 (file)
@@ -835,7 +835,8 @@ void  wxControl::OnMouseEvent( wxMouseEvent &event )
                if ( event.m_metaDown )
                        modifiers |= cmdKey ;
        
-               controlpart = FindControl( localwhere , window , &control ) ;
+//             controlpart = FindControl( localwhere , window , &control ) ;
+        control = FindControlUnderMouse( localwhere , window , &controlpart ) ;
                {
                /*
                        if ( AcceptsFocus() && FindFocus() != this )
@@ -851,7 +852,7 @@ void  wxControl::OnMouseEvent( wxMouseEvent &event )
                                        else
                                                controlpart = UMAHandleControlClick( control , localwhere , modifiers , (ControlActionUPP) -1 ) ;
                                        wxTheApp->s_lastMouseDown = 0 ;
-                                       if ( controlpart && ! ( ( UMAHasAppearance() || (controlpart != kControlIndicatorPart) ) 
+                                       if ( control && ! ( ( UMAHasAppearance() || (controlpart != kControlIndicatorPart) ) 
                                                && (IsKindOf( CLASSINFO( wxScrollBar ) ) ) ) ) // otherwise we will get the event twice
                                        {
                                                MacHandleControlClick( control , controlpart ) ;
index 1d23a5eaaee279e18b8dda8aa972cbf46ed9e925..d9735a9c221cbf5c57323182cd7cb0044d71f2f0 100644 (file)
@@ -835,7 +835,8 @@ void  wxControl::OnMouseEvent( wxMouseEvent &event )
                if ( event.m_metaDown )
                        modifiers |= cmdKey ;
        
-               controlpart = FindControl( localwhere , window , &control ) ;
+//             controlpart = FindControl( localwhere , window , &control ) ;
+        control = FindControlUnderMouse( localwhere , window , &controlpart ) ;
                {
                /*
                        if ( AcceptsFocus() && FindFocus() != this )
@@ -851,7 +852,7 @@ void  wxControl::OnMouseEvent( wxMouseEvent &event )
                                        else
                                                controlpart = UMAHandleControlClick( control , localwhere , modifiers , (ControlActionUPP) -1 ) ;
                                        wxTheApp->s_lastMouseDown = 0 ;
-                                       if ( controlpart && ! ( ( UMAHasAppearance() || (controlpart != kControlIndicatorPart) ) 
+                                       if ( control && ! ( ( UMAHasAppearance() || (controlpart != kControlIndicatorPart) ) 
                                                && (IsKindOf( CLASSINFO( wxScrollBar ) ) ) ) ) // otherwise we will get the event twice
                                        {
                                                MacHandleControlClick( control , controlpart ) ;