Calling Show() in the constructor unlocks the Looper, so calling SetPosition after that doesn't work.
Tweak the code around as it doesn't really have to be done there : * Remove the Show() method override * Make sure the window is layouted and moved to the right place before showing it (which is what this early SetPosition call attempted to do) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43173 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
dd9eb3ad8b
commit
2966cc3497
@ -190,7 +190,6 @@ NotificationWindow::MessageReceived(BMessage* message)
|
||||
group->AddInfo(view);
|
||||
|
||||
_ResizeAll();
|
||||
SetPosition();
|
||||
|
||||
reply.AddInt32("error", B_OK);
|
||||
} else
|
||||
@ -215,7 +214,6 @@ NotificationWindow::MessageReceived(BMessage* message)
|
||||
fViews.erase(it);
|
||||
|
||||
_ResizeAll();
|
||||
SetPosition();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -294,12 +292,6 @@ NotificationWindow::Width()
|
||||
void
|
||||
NotificationWindow::_ResizeAll()
|
||||
{
|
||||
if (fAppViews.empty()) {
|
||||
if (!IsHidden())
|
||||
Hide();
|
||||
return;
|
||||
}
|
||||
|
||||
appview_t::iterator aIt;
|
||||
bool shouldHide = true;
|
||||
|
||||
@ -317,9 +309,6 @@ NotificationWindow::_ResizeAll()
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsHidden())
|
||||
Show();
|
||||
|
||||
for (aIt = fAppViews.begin(); aIt != fAppViews.end(); aIt++) {
|
||||
AppGroupView* view = aIt->second;
|
||||
|
||||
@ -331,6 +320,11 @@ NotificationWindow::_ResizeAll()
|
||||
view->Show();
|
||||
}
|
||||
}
|
||||
|
||||
SetPosition();
|
||||
|
||||
if (IsHidden())
|
||||
Show();
|
||||
}
|
||||
|
||||
|
||||
@ -467,13 +461,6 @@ NotificationWindow::_SaveAppFilters()
|
||||
}
|
||||
|
||||
|
||||
void NotificationWindow::Show()
|
||||
{
|
||||
BWindow::Show();
|
||||
SetPosition();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
NotificationWindow::_LoadGeneralSettings(bool startMonitor)
|
||||
{
|
||||
|
@ -48,8 +48,6 @@ public:
|
||||
virtual BHandler* ResolveSpecifier(BMessage*, int32, BMessage*,
|
||||
int32, const char*);
|
||||
|
||||
void Show();
|
||||
|
||||
icon_size IconSize();
|
||||
int32 Timeout();
|
||||
float Width();
|
||||
|
Loading…
Reference in New Issue
Block a user