git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32699
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxMenu* m_pMenu;
WXHMENU m_theLastMenu;
bool m_iconAdded;
wxMenu* m_pMenu;
WXHMENU m_theLastMenu;
bool m_iconAdded;
+
+ void OnRightDown(wxTaskBarIconEvent& evt);
+
DECLARE_DYNAMIC_CLASS(wxTaskBarIcon)
};
#endif
DECLARE_DYNAMIC_CLASS(wxTaskBarIcon)
};
#endif
this, (&(EventHandlerRef&)m_pEventHandlerRef));
wxASSERT(err == noErr);
this, (&(EventHandlerRef&)m_pEventHandlerRef));
wxASSERT(err == noErr);
+
+ Connect(wxEVT_TASKBAR_RIGHT_DOWN, wxTaskBarIconEventHandler(wxTaskBarIcon::OnRightDown));
}
wxTaskBarIcon::~wxTaskBarIcon()
}
wxTaskBarIcon::~wxTaskBarIcon()
-#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 ;
pImage = (CGImageRef) bmp.CGImageCreate() ;
#else
WXHBITMAP iconport ;
+//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
#endif //wxHAS_TASK_BAR_ICON