Some extra locking when adding a WinBorder
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11919 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
07bde8ab89
commit
464ebc06c7
@ -239,8 +239,14 @@ void Desktop::AddWinBorder(WinBorder *winBorder)
|
|||||||
if (!winBorder)
|
if (!winBorder)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// R2: how to determine the RootLayer to which this window should be added???
|
||||||
|
// for now, use ActiveRootLayer() because we only have one instance.
|
||||||
|
|
||||||
int32 feel = winBorder->Window()->Feel();
|
int32 feel = winBorder->Window()->Feel();
|
||||||
|
|
||||||
|
// we are ServerApp thread, we need to lock RootLayer here.
|
||||||
|
ActiveRootLayer()->Lock();
|
||||||
|
|
||||||
// we're playing with window list. lock first.
|
// we're playing with window list. lock first.
|
||||||
Lock();
|
Lock();
|
||||||
|
|
||||||
@ -285,14 +291,13 @@ void Desktop::AddWinBorder(WinBorder *winBorder)
|
|||||||
winBorder->App()->fAppFMWList.AddWinBorder(winBorder);
|
winBorder->App()->fAppFMWList.AddWinBorder(winBorder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// send WinBorder to be added to workspaces
|
||||||
|
ActiveRootLayer()->AddWinBorder(winBorder);
|
||||||
|
|
||||||
// hey, unlock!
|
// hey, unlock!
|
||||||
Unlock();
|
Unlock();
|
||||||
|
|
||||||
// R2: how to determine the RootLayer to which this window should be added???
|
ActiveRootLayer()->Unlock();
|
||||||
// for now, use ActiveRootLayer() because we only have one instance.
|
|
||||||
|
|
||||||
// send WinBorder to be added to workspaces
|
|
||||||
ActiveRootLayer()->AddWinBorder(winBorder);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Desktop::RemoveWinBorder(WinBorder *winBorder)
|
void Desktop::RemoveWinBorder(WinBorder *winBorder)
|
||||||
@ -300,6 +305,9 @@ void Desktop::RemoveWinBorder(WinBorder *winBorder)
|
|||||||
if (!winBorder)
|
if (!winBorder)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// we are ServerApp thread, we need to lock RootLayer here.
|
||||||
|
ActiveRootLayer()->Lock();
|
||||||
|
|
||||||
// we're playing with window list. lock first.
|
// we're playing with window list. lock first.
|
||||||
Lock();
|
Lock();
|
||||||
|
|
||||||
@ -348,6 +356,8 @@ void Desktop::RemoveWinBorder(WinBorder *winBorder)
|
|||||||
|
|
||||||
// unlock!
|
// unlock!
|
||||||
Unlock();
|
Unlock();
|
||||||
|
|
||||||
|
ActiveRootLayer()->Unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Desktop::AddWinBorderToSubset(WinBorder *winBorder, WinBorder *toWinBorder)
|
void Desktop::AddWinBorderToSubset(WinBorder *winBorder, WinBorder *toWinBorder)
|
||||||
|
Loading…
Reference in New Issue
Block a user