X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/519cb848a8f4c91c73421bb75314754284e593a4..830ed6d97d913f9d3cf53999a82d3507d5aebde4:/src/mac/cursor.cpp diff --git a/src/mac/cursor.cpp b/src/mac/cursor.cpp index bcbe30008b..fa0bbf76b2 100644 --- a/src/mac/cursor.cpp +++ b/src/mac/cursor.cpp @@ -23,12 +23,26 @@ IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxBitmap) const short kwxCursorHandId = 9 ; const short kwxCursorSizeWEId = 10 ; const short kwxCursorSizeNSId = 11 ; +#if !TARGET_CARBON Cursor* MacArrowCursorPtr = &qd.arrow ; CursHandle MacArrowCursor = &MacArrowCursorPtr ; +#else +bool MacArrowInstalled = false ; +Cursor MacArrow ; +Cursor* MacArrowCursorPtr = &MacArrow ; +CursHandle MacArrowCursor = &MacArrowCursorPtr ; +#endif CursHandle gMacCurrentCursor = NULL ; wxCursorRefData::wxCursorRefData() { +#if TARGET_CARBON + if ( !MacArrowInstalled ) + { + MacArrowCursorPtr = GetQDGlobalsArrow( &MacArrow ) ; + MacArrowInstalled = true ; + } +#endif m_width = 32; m_height = 32; m_hCursor = NULL ; @@ -36,8 +50,8 @@ wxCursorRefData::wxCursorRefData() wxCursorRefData::~wxCursorRefData() { - if ( m_hCursor && ( m_hCursor != MacArrowCursor ) ) - ::DisposeHandle( (Handle) m_hCursor ) ; +// if ( m_hCursor && ( m_hCursor != MacArrowCursor ) ) +// ::ReleaseResource( (Handle) m_hCursor ) ; } // Cursors