X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5614fdec8b7cd596743244dd9421883f352781f8..2f5000cf01639bf00dd59091f76b16e11939c3b8:/src/mac/carbon/taskbar.cpp diff --git a/src/mac/carbon/taskbar.cpp b/src/mac/carbon/taskbar.cpp index 74490f125c..9c46425f45 100644 --- a/src/mac/carbon/taskbar.cpp +++ b/src/mac/carbon/taskbar.cpp @@ -143,6 +143,8 @@ wxTaskBarIcon::wxTaskBarIcon(const wxTaskBarIconType& nType) this, (&(EventHandlerRef&)m_pEventHandlerRef)); wxASSERT(err == noErr); + + Connect(wxEVT_TASKBAR_RIGHT_DOWN, wxTaskBarIconEventHandler(wxTaskBarIcon::OnRightDown)); } wxTaskBarIcon::~wxTaskBarIcon() @@ -181,7 +183,7 @@ bool wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip) CGImageRef pImage; -#if 1 // is always available under OSX now +#if 0 // is always available under OSX now -- crashes on 10.2 in CFRetain() - RN pImage = (CGImageRef) bmp.CGImageCreate() ; #else WXHBITMAP iconport ; @@ -289,4 +291,10 @@ bool wxTaskBarIcon::PopupMenu(wxMenu *menu) return true; } +//Skip the event so that popupmenu isn't called in parent, avoiding double-creation of the menus +void wxTaskBarIcon::OnRightDown(wxTaskBarIconEvent& evt) +{ + evt.Skip(); +} + #endif //wxHAS_TASK_BAR_ICON