DrawSlider() now locks the looper - this should fix bug #396.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17002 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2006-04-04 10:26:19 +00:00
parent 0bc3125c08
commit 4b1da1ce9a

View File

@ -716,24 +716,26 @@ BSlider::Draw(BRect updateRect)
void
BSlider::DrawSlider()
{
if (LockLooper()) {
#if USE_OFF_SCREEN_VIEW
if (!fOffScreenBits)
return;
if (fOffScreenBits->Lock()) {
if (!fOffScreenBits)
return;
if (fOffScreenBits->Lock()) {
#endif
DrawBar();
DrawHashMarks();
DrawThumb();
DrawFocusMark();
DrawText();
DrawBar();
DrawHashMarks();
DrawThumb();
DrawFocusMark();
DrawText();
#if USE_OFF_SCREEN_VIEW
fOffScreenView->Sync();
fOffScreenBits->Unlock();
DrawBitmap(fOffScreenBits, B_ORIGIN);
fOffScreenView->Sync();
fOffScreenBits->Unlock();
DrawBitmap(fOffScreenBits, B_ORIGIN);
}
#endif
}
#endif
}