* Fixed a possible deadlock on quit: ActivityView::DetachedFromWindow() is

called with the window lock held, so it's not a good idea to wait for a
  thread that may also lock the window. Now, it no longer does that, but just
  sends a B_INVALIDATE message instead of calling Invalidate() directly.
* This closes bug #2737.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27599 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-09-17 18:01:37 +00:00
parent dc79961e1e
commit 4ce1e1d2e4

View File

@ -1271,6 +1271,7 @@ void
ActivityView::_Refresh()
{
bigtime_t lastTimeout = system_time() - fRefreshInterval;
BMessenger target(this);
while (true) {
status_t status = acquire_sem_etc(fRefreshSem, 1, B_ABSOLUTE_TIMEOUT,
@ -1297,11 +1298,8 @@ ActivityView::_Refresh()
bigtime_t now = info.Time();
if (fLastRefresh + fDrawInterval <= now) {
if (LockLooper()) {
Invalidate();
UnlockLooper();
fLastRefresh = now;
}
target.SendMessage(B_INVALIDATE);
fLastRefresh = now;
}
}
}