From 6aa4743b517e1b0c8c9138ed55aef85ae2cb5eb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sun, 16 Apr 2006 13:18:35 +0000 Subject: [PATCH] Added TODO comments about some race conditions in the code because of unlocking the desktop. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17139 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/ServerWindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/servers/app/ServerWindow.cpp b/src/servers/app/ServerWindow.cpp index 0e55f83ef9..0bea437456 100644 --- a/src/servers/app/ServerWindow.cpp +++ b/src/servers/app/ServerWindow.cpp @@ -607,6 +607,7 @@ fDesktop->LockSingleWindow(); WindowLayer *behindOf; if ((behindOf = fDesktop->FindWindowLayerByClientToken(token, teamID)) != NULL) { fDesktop->UnlockSingleWindow(); +// TODO: there is a big race condition when we unlock here (window could be gone by now)! fDesktop->SendWindowBehind(fWindowLayer, behindOf); fDesktop->LockSingleWindow(); status = B_OK; @@ -673,6 +674,7 @@ fDesktop->LockSingleWindow(); status = B_BAD_VALUE; } else { fDesktop->UnlockSingleWindow(); +// TODO: there is a big race condition when we unlock here (window could be gone by now)! status = fDesktop->AddWindowToSubset(fWindowLayer, windowLayer) ? B_OK : B_NO_MEMORY; fDesktop->LockSingleWindow(); @@ -694,6 +696,7 @@ fDesktop->LockSingleWindow(); token, App()->ClientTeam()); if (windowLayer != NULL) { fDesktop->UnlockSingleWindow(); +// TODO: there is a big race condition when we unlock here (window could be gone by now)! fDesktop->RemoveWindowFromSubset(fWindowLayer, windowLayer); fDesktop->LockSingleWindow(); status = B_OK;