Moved the RootLayer::LayerRemoved() call from the ServerWindow destructor to RootLayer::RemoveWinBorder().
ServerWindow printed the title in its destructor after freeing it (with debug output turned on). Calmed it down a bit, too (disabled "listening on port..."). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13741 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -406,6 +406,7 @@ Layer::FindLayer(const int32 token)
|
||||
Layer*
|
||||
Layer::LayerAt(const BPoint &pt)
|
||||
{
|
||||
//printf("%p:%s:LayerAt(x = %g, y = %g)\n", this, Name(), pt.x, pt.y);
|
||||
#ifndef NEW_CLIPPING
|
||||
if (fVisible.Contains(pt))
|
||||
return this;
|
||||
|
||||
@@ -592,17 +592,21 @@ RootLayer::RemoveWinBorder(WinBorder* winBorder)
|
||||
// security measure: in case of windows whose workspace count is 0(current workspace),
|
||||
// we don't know the exact workspaces to remove it from. And how all modal and floating
|
||||
// windows have 0 as a workspace index, this action is fully justified.
|
||||
for (int32 i = 0; i < fWsCount; i++)
|
||||
for (int32 i = 0; i < fWsCount; i++) {
|
||||
if (fWorkspace[i])
|
||||
fWorkspace[i]->RemoveWinBorder(winBorder);
|
||||
}
|
||||
|
||||
// we _DO_NOT_ need to invalidate here. At this point our WinBorder is hidden!
|
||||
|
||||
LayerRemoved(winBorder);
|
||||
|
||||
// set some internals
|
||||
winBorder->SetRootLayer(NULL);
|
||||
winBorder->fParent = NULL;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
RootLayer::AddSubsetWinBorder(WinBorder *winBorder, WinBorder *toWinBorder)
|
||||
{
|
||||
|
||||
@@ -98,18 +98,11 @@ ServerWindow::ServerWindow(const char *title, ServerApp *app,
|
||||
//!Tears down all connections the main app_server objects, and deletes some internals.
|
||||
ServerWindow::~ServerWindow()
|
||||
{
|
||||
STRACE(("*ServerWindow (%s):~ServerWindow()\n", fTitle));
|
||||
STRACE(("*ServerWindow(%s@%p):~ServerWindow()\n", fTitle, this));
|
||||
|
||||
if (!fWinBorder->IsOffscreenWindow())
|
||||
gDesktop->RemoveWinBorder(fWinBorder);
|
||||
|
||||
// just to be safe
|
||||
RootLayer* rootLayer = fWinBorder->GetRootLayer();
|
||||
if (rootLayer && rootLayer->Lock()) {
|
||||
rootLayer->LayerRemoved(fWinBorder);
|
||||
rootLayer->Unlock();
|
||||
}
|
||||
|
||||
delete fWinBorder;
|
||||
|
||||
free(const_cast<char *>(fTitle));
|
||||
@@ -117,7 +110,7 @@ ServerWindow::~ServerWindow()
|
||||
|
||||
BPrivate::gDefaultTokens.RemoveToken(fServerToken);
|
||||
|
||||
STRACE(("#ServerWindow(%s) will exit NOW\n", fTitle));
|
||||
STRACE(("#ServerWindow(%p) will exit NOW\n", this));
|
||||
}
|
||||
|
||||
|
||||
@@ -2165,8 +2158,8 @@ ServerWindow::_MessageLooper()
|
||||
bool quitLoop = false;
|
||||
|
||||
while (!quitLoop) {
|
||||
STRACE(("info: ServerWindow::MonitorWin listening on port %ld.\n",
|
||||
fMessagePort));
|
||||
//STRACE(("info: ServerWindow::MonitorWin listening on port %ld.\n",
|
||||
// fMessagePort));
|
||||
|
||||
int32 code;
|
||||
status_t status = receiver.GetNextMessage(code);
|
||||
|
||||
Reference in New Issue
Block a user