]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/taskbar.mm
remove streams tests: they're very basic and already-existing CppUnit stream tests...
[wxWidgets.git] / src / cocoa / taskbar.mm
index 78bc7c5747cf70c57e6a0d8d51b82f4abad04ff8..05ceafc5ca9ec09fae1b8c4a20a7cd3d2a931410 100644 (file)
@@ -311,8 +311,9 @@ bool wxTaskBarIconCustomStatusItemImpl::RemoveIcon()
 
 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:)])
@@ -328,7 +329,6 @@ bool wxTaskBarIconCustomStatusItemImpl::PopupMenu(wxMenu *menu)
             eventNumber:0 clickCount:1 pressure:0.0];
         [NSMenu popUpContextMenu:menu->GetNSMenu() withEvent:nsevent forView:m_iconWindow->GetNSView()];
     }
-    menu->SetInvokingWindow(NULL);
     return true;
 }