X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7890a36c9c34b5626ceada90956d0c69941a56af..5e8c9935fda0029fadba1c4106f15fb39b8eec39:/src/mac/carbon/taskbar.cpp diff --git a/src/mac/carbon/taskbar.cpp b/src/mac/carbon/taskbar.cpp index a38447a3e4..a373300546 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 wxMAC_USE_CORE_GRAPHICS +#if 0 // is always available under OSX now -- crashes on 10.2 in CFRetain() - RN pImage = (CGImageRef) bmp.CGImageCreate() ; #else WXHBITMAP iconport ; @@ -279,7 +281,7 @@ bool wxTaskBarIcon::PopupMenu(wxMenu *menu) theItem->GetId(), //id theItem->GetText(), //text label theItem->GetHelp(), //status bar help string - theItem->GetKind(), //menu flags - checkable, seperator, etc. + theItem->GetKind(), //menu flags - checkable, separator, etc. theItem->GetSubMenu() //submenu )); theNode = theNode->GetNext(); @@ -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