Add wxTaskBarIcon::GetPopupMenu()

This is similar to CreatePopupMenu(), but the menu pointer returned by
the new function won't be deleted by wxWidgets, allowing it to return
the same pointer every time it is called.

Closes #18886.
This commit is contained in:
Andreas Falkenhahn
2020-08-14 19:30:46 +02:00
committed by Vadim Zeitlin
parent 5a27ea9a86
commit c70a8261cb
4 changed files with 55 additions and 9 deletions

View File

@@ -53,6 +53,13 @@ void wxTaskBarIconBase::OnRightButtonDown(wxTaskBarIconEvent& WXUNUSED(event))
PopupMenu(menu);
delete menu;
}
else
{
menu = GetPopupMenu();
if (menu)
PopupMenu(menu);
}
}
void wxTaskBarIconBase::Destroy()