]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/control.cpp
- better behaviour of wxMGL's wxTimer w.r.t. memory allocations
[wxWidgets.git] / src / mac / control.cpp
index 55aca27152a82ccab49da0bad6bacba5df0e66c3..8c19e3cec28ee9585c8508cd60fa0213d8038fde 100644 (file)
@@ -609,6 +609,7 @@ void  wxControl::DoSetSize(int x, int y,
                              m_width - 2 * m_macHorizontalBorder,
                              m_height -  2 * m_macVerticalBorder ) ;
  
              wxSizeEvent event(wxSize(m_width, m_height), m_windowId);
              event.SetEventObject(this);
              GetEventHandler()->ProcessEvent(event);
@@ -834,13 +835,13 @@ void  wxControl::OnMouseEvent( wxMouseEvent &event )
        
                if ( event.m_metaDown )
                        modifiers |= cmdKey ;
-
+/*
 #if TARGET_CARBON
         control = FindControlUnderMouse( localwhere , window , &controlpart ) ;
 #else
-//        control = FindControlUnderMouse( localwhere , window , &controlpart ) ;
                controlpart = FindControl( localwhere , window , &control ) ;
 #endif
+*/
                {
                /*
                        if ( AcceptsFocus() && FindFocus() != this )
@@ -848,18 +849,17 @@ void  wxControl::OnMouseEvent( wxMouseEvent &event )
                                SetFocus() ;
                        }
                */
+                   control = m_macControl ;
                        if ( control && ::IsControlActive( control ) )
                        {
                                {
-                                       if ( controlpart == kControlIndicatorPart && !UMAHasAppearance() )
-                                               controlpart = ::HandleControlClick( control , localwhere , modifiers , (ControlActionUPP) NULL ) ;
-                                       else
-                                               controlpart = ::HandleControlClick( control , localwhere , modifiers , (ControlActionUPP) -1 ) ;
+                                       controlpart = ::HandleControlClick( control , localwhere , modifiers , (ControlActionUPP) -1 ) ;
                                        wxTheApp->s_lastMouseDown = 0 ;
-                                       if ( control && ! ( ( UMAHasAppearance() || (controlpart != kControlIndicatorPart) ) 
-                                               && (IsKindOf( CLASSINFO( wxScrollBar ) ) ) ) ) // otherwise we will get the event twice
+                                       if ( control && controlpart != kControlNoPart && 
+                                           ! IsKindOf( CLASSINFO( wxScrollBar ) ) 
+                                       ) // otherwise we will get the event twice for scrollbar
                                        {
-                                               MacHandleControlClick( control , controlpart ) ;
+                                           MacHandleControlClick( control , controlpart ) ;
                                        }
                                }
                        }