Lock WindowForClientLooperPort method and add comment that the window lock has to be held if accessing the a WindowList.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38215 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -2487,6 +2487,8 @@ Desktop::AllWindows()
|
||||
Window*
|
||||
Desktop::WindowForClientLooperPort(port_id port)
|
||||
{
|
||||
AutoReadLocker locker(fWindowLock);
|
||||
|
||||
for (Window* window = fAllWindows.FirstWindow(); window != NULL;
|
||||
window = window->NextWindow(kAllWindowList)) {
|
||||
if (window->ServerWindow()->ClientLooperPort() == port)
|
||||
|
||||
@@ -257,6 +257,7 @@ public:
|
||||
void WriteWindowOrder(int32 workspace,
|
||||
BPrivate::LinkSender& sender);
|
||||
|
||||
//! The window lock has to be held when accessing a window list!
|
||||
WindowList& CurrentWindows();
|
||||
WindowList& AllWindows();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user