You must not have RootLayer locked when calling any method from EventDispatcher;

just another case of troublesome generic RootLayer locking in ServerWindow
(I'm looking forward to get rid of this).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15249 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-11-30 19:51:43 +00:00
parent 6aae81b3e1
commit ed656a3a9b

View File

@ -977,16 +977,13 @@ ServerWindow::_DispatchMessage(int32 code, BPrivate::LinkReceiver &link)
rgb_color c;
link.Read(&c, sizeof(rgb_color));
if (rootLayer)
rootLayer->Lock();
fCurrentLayer->SetViewColor(RGBColor(c));
if (rootLayer && !fCurrentLayer->IsHidden()) {
rootLayer->MarkForRedraw(fCurrentLayer->VisibleRegion());
rootLayer->TriggerRedraw();
}
if (rootLayer)
rootLayer->Unlock();
break;
}
@ -1566,6 +1563,7 @@ if (rootLayer)
// Returns
// 1) BPoint mouse location
// 2) int32 button state
rootLayer->Unlock();
BPoint where;
int32 buttons;
@ -1575,6 +1573,8 @@ if (rootLayer)
fLink.Attach<BPoint>(where);
fLink.Attach<int32>(buttons);
fLink.Flush();
rootLayer->Lock();
break;
}