// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "taskbar.h"
-#endif
-
#include "wx/wxprec.h"
#ifdef wxHAS_TASK_BAR_ICON
bool wxTaskBarIconCustomStatusItemImpl::PopupMenu(wxMenu *menu)
{
- wxASSERT(menu);
- menu->SetInvokingWindow(m_iconWindow);
+ wxCHECK_MSG(menu, false, "can't popup a NULL menu");
+
+ wxMenuInvokingWindowSetter setInvokingWin(*menu, m_iconWindow);
menu->UpdateUI();
if([m_cocoaNSStatusItem respondsToSelector:@selector(popUpStatusItemMenu:)])
eventNumber:0 clickCount:1 pressure:0.0];
[NSMenu popUpContextMenu:menu->GetNSMenu() withEvent:nsevent forView:m_iconWindow->GetNSView()];
}
- menu->SetInvokingWindow(NULL);
return true;
}
// This neatly solves the problem of DLL separation. If the wxAdvanced
// library (which this file is part of) is loaded then this category is
-// defined and we get dock menu behavior without app.mm ever having to
+// defined and we get dock menu behaviour without app.mm ever having to
// know we exist. C++ did sucketh so. :-)
@interface wxNSApplicationDelegate(wxTaskBarIconNSApplicationDelegateCategory)