* 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:
@@ -1271,6 +1271,7 @@ void
|
|||||||
ActivityView::_Refresh()
|
ActivityView::_Refresh()
|
||||||
{
|
{
|
||||||
bigtime_t lastTimeout = system_time() - fRefreshInterval;
|
bigtime_t lastTimeout = system_time() - fRefreshInterval;
|
||||||
|
BMessenger target(this);
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
status_t status = acquire_sem_etc(fRefreshSem, 1, B_ABSOLUTE_TIMEOUT,
|
status_t status = acquire_sem_etc(fRefreshSem, 1, B_ABSOLUTE_TIMEOUT,
|
||||||
@@ -1297,11 +1298,8 @@ ActivityView::_Refresh()
|
|||||||
|
|
||||||
bigtime_t now = info.Time();
|
bigtime_t now = info.Time();
|
||||||
if (fLastRefresh + fDrawInterval <= now) {
|
if (fLastRefresh + fDrawInterval <= now) {
|
||||||
if (LockLooper()) {
|
target.SendMessage(B_INVALIDATE);
|
||||||
Invalidate();
|
fLastRefresh = now;
|
||||||
UnlockLooper();
|
|
||||||
fLastRefresh = now;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user