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:
committed by
Vadim Zeitlin
parent
5a27ea9a86
commit
c70a8261cb
@@ -53,6 +53,13 @@ void wxTaskBarIconBase::OnRightButtonDown(wxTaskBarIconEvent& WXUNUSED(event))
|
||||
PopupMenu(menu);
|
||||
delete menu;
|
||||
}
|
||||
else
|
||||
{
|
||||
menu = GetPopupMenu();
|
||||
|
||||
if (menu)
|
||||
PopupMenu(menu);
|
||||
}
|
||||
}
|
||||
|
||||
void wxTaskBarIconBase::Destroy()
|
||||
|
||||
Reference in New Issue
Block a user