Deskbar: Inital FetchIcon() in AttachedToWindow()

This ensures that we have a connection to App Server at the
time we are fetching the icon.

Hopefully fixes #13172
This commit is contained in:
John Scipione 2017-01-08 11:02:59 -08:00
parent 223ea4329f
commit 52e243a7d1
2 changed files with 11 additions and 1 deletions

View File

@ -111,7 +111,6 @@ TBarMenuBar::TBarMenuBar(BRect frame, const char* name, TBarView* barView)
fDeskbarMenuItem = new TDeskbarMenuTitle(frame.Width(), frame.Height(),
NULL, beMenu);
fDeskbarMenuItem->FetchIcon();
AddItem(fDeskbarMenuItem);
}
@ -121,6 +120,15 @@ TBarMenuBar::~TBarMenuBar()
}
void
TBarMenuBar::AttachedToWindow()
{
fDeskbarMenuItem->FetchIcon();
BMenuBar::AttachedToWindow();
}
void
TBarMenuBar::SmartResize(float width, float height)
{

View File

@ -62,6 +62,8 @@ public:
TBarView* barView);
virtual ~TBarMenuBar();
virtual void AttachedToWindow();
virtual void MouseMoved(BPoint where, uint32 code,
const BMessage* message);