diff --git a/include/wx/cocoa/taskbar.h b/include/wx/cocoa/taskbar.h index 4316e92ebb..833cf83143 100644 --- a/include/wx/cocoa/taskbar.h +++ b/include/wx/cocoa/taskbar.h @@ -22,11 +22,10 @@ class WXDLLEXPORT wxIcon; class WXDLLEXPORT wxMenu; class wxTaskBarIconCocoaImpl; -class wxTaskBarIconDockImpl; class WXDLLEXPORT wxTaskBarIcon : public wxTaskBarIconBase { - friend class wxTaskBarIconDockImpl; + friend class wxTaskBarIconCocoaImpl; DECLARE_DYNAMIC_CLASS_NO_COPY(wxTaskBarIcon) public: //type of taskbar item to create (currently only DOCK is implemented) diff --git a/src/cocoa/taskbar.mm b/src/cocoa/taskbar.mm index 5975e31c3d..1a5cd8e500 100644 --- a/src/cocoa/taskbar.mm +++ b/src/cocoa/taskbar.mm @@ -61,6 +61,10 @@ public: virtual ~wxTaskBarIconCocoaImpl(); inline wxTaskBarIcon* GetTaskBarIcon() { return m_taskBarIcon; } protected: + inline wxMenu* CreatePopupMenu() + { wxASSERT(m_taskBarIcon); + m_taskBarIcon->CreatePopupMenu(); + } wxTaskBarIcon *m_taskBarIcon; wxTaskBarIconWindow *m_iconWindow; private: @@ -231,7 +235,7 @@ WX_NSMenu wxTaskBarIconDockImpl::CocoaGetDockNSMenu() WX_NSMenu wxTaskBarIconDockImpl::CocoaDoGetDockNSMenu() { - wxMenu *dockMenu = m_taskBarIcon->CreatePopupMenu(); + wxMenu *dockMenu = CreatePopupMenu(); if(!dockMenu) return nil; if(!m_iconWindow)