From 547a7d1844566a29d3d2fc29a3fbc639ea0bc532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sun, 3 Aug 2008 16:19:25 +0000 Subject: [PATCH] * Since ShowWindow() could call ActivateWindow() again as well, we should better call Window::SetMinimized() before calling it from there. * And since ShowWindow() calls _SendFakeMouseMoved(), we also better don't call it with the window lock held, or otherwise we would potentially cause a deadlock. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26760 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/Desktop.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/servers/app/Desktop.cpp b/src/servers/app/Desktop.cpp index a4914a983e..6d8a6560ae 100644 --- a/src/servers/app/Desktop.cpp +++ b/src/servers/app/Desktop.cpp @@ -1538,8 +1538,13 @@ Desktop::ActivateWindow(Window* window) if (window->IsMinimized()) { // Unlike WindowAction(), this is called from the application itself, // so we will just unminimize the window here. - ShowWindow(window); window->SetMinimized(false); + UnlockAllWindows(); + + ShowWindow(window); + + if (!LockAllWindows()) + return; } if (window == FrontWindow()) {