X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/404dfcae70bd419411c185ef7f5eba4b043432a6..f2d990adc1b8c0e93107eb87df2ab42df849c7fa:/src/mac/control.cpp diff --git a/src/mac/control.cpp b/src/mac/control.cpp index c3c915f85b..92e8cd3cc8 100644 --- a/src/mac/control.cpp +++ b/src/mac/control.cpp @@ -400,6 +400,10 @@ void wxControl::MacPostControlCreate() { wxMacControlActionUPP = NewControlDefUPP( wxMacControlDefintion ) ; } + // The following block of code is responsible for crashes when switching + // back to windows, which can be seen in the dialogs sample. + // It is disabled until a proper solution can be found. +#if 0 #if TARGET_CARBON /* only working under classic carbon @@ -417,6 +421,7 @@ void wxControl::MacPostControlCreate() (**cdef).function = (void(*)()) wxMacControlActionUPP; (**(ControlHandle)m_macControl).contrlDefProc = (Handle) cdef ; } +#endif #endif SetControlColorProc( (ControlHandle) m_macControl , wxMacSetupControlBackgroundUPP ) ; @@ -437,6 +442,9 @@ void wxControl::MacPostControlCreate() SetSize(pos.x, pos.y, new_size.x, new_size.y); UMAShowControl( (ControlHandle) m_macControl ) ; + + SetCursor( *wxSTANDARD_CURSOR ) ; + Refresh() ; } @@ -819,7 +827,6 @@ void wxControl::OnMouseEvent( wxMouseEvent &event ) ControlHandle control ; Point localwhere ; SInt16 controlpart ; - WindowRef window = (WindowRef) MacGetRootWindow() ; localwhere.h = x ; localwhere.v = y ; @@ -840,20 +847,7 @@ void wxControl::OnMouseEvent( wxMouseEvent &event ) if ( event.m_metaDown ) modifiers |= cmdKey ; -/* -#if TARGET_CARBON - control = FindControlUnderMouse( localwhere , window , &controlpart ) ; -#else - controlpart = FindControl( localwhere , window , &control ) ; -#endif -*/ { - /* - if ( AcceptsFocus() && FindFocus() != this ) - { - SetFocus() ; - } - */ control = (ControlHandle) m_macControl ; if ( control && ::IsControlActive( control ) ) {