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*
|
||||||
Layer::LayerAt(const BPoint &pt)
|
Layer::LayerAt(const BPoint &pt)
|
||||||
{
|
{
|
||||||
|
//printf("%p:%s:LayerAt(x = %g, y = %g)\n", this, Name(), pt.x, pt.y);
|
||||||
#ifndef NEW_CLIPPING
|
#ifndef NEW_CLIPPING
|
||||||
if (fVisible.Contains(pt))
|
if (fVisible.Contains(pt))
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -592,17 +592,21 @@ RootLayer::RemoveWinBorder(WinBorder* winBorder)
|
|||||||
// security measure: in case of windows whose workspace count is 0(current workspace),
|
// 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
|
// 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.
|
// 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])
|
if (fWorkspace[i])
|
||||||
fWorkspace[i]->RemoveWinBorder(winBorder);
|
fWorkspace[i]->RemoveWinBorder(winBorder);
|
||||||
|
}
|
||||||
|
|
||||||
// we _DO_NOT_ need to invalidate here. At this point our WinBorder is hidden!
|
// we _DO_NOT_ need to invalidate here. At this point our WinBorder is hidden!
|
||||||
|
|
||||||
|
LayerRemoved(winBorder);
|
||||||
|
|
||||||
// set some internals
|
// set some internals
|
||||||
winBorder->SetRootLayer(NULL);
|
winBorder->SetRootLayer(NULL);
|
||||||
winBorder->fParent = NULL;
|
winBorder->fParent = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
RootLayer::AddSubsetWinBorder(WinBorder *winBorder, WinBorder *toWinBorder)
|
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.
|
//!Tears down all connections the main app_server objects, and deletes some internals.
|
||||||
ServerWindow::~ServerWindow()
|
ServerWindow::~ServerWindow()
|
||||||
{
|
{
|
||||||
STRACE(("*ServerWindow (%s):~ServerWindow()\n", fTitle));
|
STRACE(("*ServerWindow(%s@%p):~ServerWindow()\n", fTitle, this));
|
||||||
|
|
||||||
if (!fWinBorder->IsOffscreenWindow())
|
if (!fWinBorder->IsOffscreenWindow())
|
||||||
gDesktop->RemoveWinBorder(fWinBorder);
|
gDesktop->RemoveWinBorder(fWinBorder);
|
||||||
|
|
||||||
// just to be safe
|
|
||||||
RootLayer* rootLayer = fWinBorder->GetRootLayer();
|
|
||||||
if (rootLayer && rootLayer->Lock()) {
|
|
||||||
rootLayer->LayerRemoved(fWinBorder);
|
|
||||||
rootLayer->Unlock();
|
|
||||||
}
|
|
||||||
|
|
||||||
delete fWinBorder;
|
delete fWinBorder;
|
||||||
|
|
||||||
free(const_cast<char *>(fTitle));
|
free(const_cast<char *>(fTitle));
|
||||||
@@ -117,7 +110,7 @@ ServerWindow::~ServerWindow()
|
|||||||
|
|
||||||
BPrivate::gDefaultTokens.RemoveToken(fServerToken);
|
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;
|
bool quitLoop = false;
|
||||||
|
|
||||||
while (!quitLoop) {
|
while (!quitLoop) {
|
||||||
STRACE(("info: ServerWindow::MonitorWin listening on port %ld.\n",
|
//STRACE(("info: ServerWindow::MonitorWin listening on port %ld.\n",
|
||||||
fMessagePort));
|
// fMessagePort));
|
||||||
|
|
||||||
int32 code;
|
int32 code;
|
||||||
status_t status = receiver.GetNextMessage(code);
|
status_t status = receiver.GetNextMessage(code);
|
||||||
|
|||||||
Reference in New Issue
Block a user