* AS_ACTIVATE_WINDOW must not hold a window lock when calling

Desktop::ActivateWindow(), or Desktop::SendWindowBehind().
* This fixes a potential deadlock.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28217 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2008-10-17 15:48:29 +00:00
parent c3657d1abd
commit c2a8fd9b70
+4 -1
View File
@@ -672,10 +672,14 @@ ServerWindow::_DispatchMessage(int32 code, BPrivate::LinkReceiver &link)
link.Read<bool>(&activate); link.Read<bool>(&activate);
fDesktop->UnlockSingleWindow();
if (activate) if (activate)
fDesktop->ActivateWindow(fWindow); fDesktop->ActivateWindow(fWindow);
else else
fDesktop->SendWindowBehind(fWindow, NULL); fDesktop->SendWindowBehind(fWindow, NULL);
fDesktop->LockSingleWindow();
break; break;
} }
case AS_SEND_BEHIND: case AS_SEND_BEHIND:
@@ -3437,7 +3441,6 @@ bool
ServerWindow::_MessageNeedsAllWindowsLocked(uint32 code) const ServerWindow::_MessageNeedsAllWindowsLocked(uint32 code) const
{ {
switch (code) { switch (code) {
case AS_ACTIVATE_WINDOW:
case AS_SET_WINDOW_TITLE: case AS_SET_WINDOW_TITLE:
case AS_ADD_TO_SUBSET: case AS_ADD_TO_SUBSET:
case AS_REMOVE_FROM_SUBSET: case AS_REMOVE_FROM_SUBSET: