Unset the text buffer listener when being detached from the window, and
synchronize with the text buffer when being re-attached. Fixes the problem that after switching to another tab and back ongoing output wouldn't show anymore. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25965 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ecd79a2cc1
commit
5fcf3f86e8
@ -956,11 +956,16 @@ TermView::AttachedToWindow()
|
|||||||
}
|
}
|
||||||
|
|
||||||
BMessenger thisMessenger(this);
|
BMessenger thisMessenger(this);
|
||||||
fTextBuffer->SetListener(thisMessenger);
|
|
||||||
|
|
||||||
BMessage message(kUpdateSigWinch);
|
BMessage message(kUpdateSigWinch);
|
||||||
fWinchRunner = new (std::nothrow) BMessageRunner(thisMessenger,
|
fWinchRunner = new (std::nothrow) BMessageRunner(thisMessenger,
|
||||||
&message, 500000);
|
&message, 500000);
|
||||||
|
|
||||||
|
{
|
||||||
|
BAutolock _(fTextBuffer);
|
||||||
|
fTextBuffer->SetListener(thisMessenger);
|
||||||
|
_SynchronizeWithTextBuffer(0, -1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -972,6 +977,11 @@ TermView::DetachedFromWindow()
|
|||||||
|
|
||||||
delete fCursorBlinkRunner;
|
delete fCursorBlinkRunner;
|
||||||
fCursorBlinkRunner = NULL;
|
fCursorBlinkRunner = NULL;
|
||||||
|
|
||||||
|
{
|
||||||
|
BAutolock _(fTextBuffer);
|
||||||
|
fTextBuffer->UnsetListener();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user