The app_server now cleans up better after a team crashed; not only the

application and bitmaps are removed, the team's windows are now removed
as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13251 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-06-23 23:21:10 +00:00
parent d2e5d36050
commit 1b53e8af26
3 changed files with 51 additions and 2 deletions
+7 -2
View File
@@ -80,6 +80,7 @@ ServerWindow::ServerWindow(const char *title, ServerApp *app,
fMessagePort(-1),
fClientReplyPort(clientPort),
fClientLooperPort(looperPort),
fQuitting(false),
fClientViewsWithInvalidCoords(B_VIEW_RESIZED),
fHandlerToken(handlerID),
fCurrentLayer(NULL)
@@ -160,6 +161,8 @@ ServerWindow::Run()
void
ServerWindow::Quit()
{
fQuitting = true;
if (fThread < B_OK) {
delete this;
return;
@@ -170,8 +173,10 @@ ServerWindow::Quit()
delete this;
exit_thread(0);
} else
} else {
PostMessage(AS_HIDE_WINDOW);
PostMessage(kMsgWindowQuit);
}
}
@@ -206,7 +211,7 @@ ServerWindow::Show()
// NOTE: if you do something else, other than sending a port message, PLEASE lock
STRACE(("ServerWindow %s: Show\n", Title()));
if (!fWinBorder->IsHidden())
if (fQuitting || !fWinBorder->IsHidden())
return;
fWinBorder->GetRootLayer()->ShowWinBorder(fWinBorder);