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