From 2a472699077aad35bd6bc2651b29f1c895614101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 9 Feb 2006 10:44:02 +0000 Subject: [PATCH] SetWindowFocus() could reset the focus of a window that already had focus. This fixes bug #128. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16305 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/Desktop.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/servers/app/Desktop.cpp b/src/servers/app/Desktop.cpp index 1569550381..9a899e75c7 100644 --- a/src/servers/app/Desktop.cpp +++ b/src/servers/app/Desktop.cpp @@ -955,6 +955,11 @@ Desktop::SetFocusWindow(WindowLayer* focus) focus = focus->PreviousWindow(fCurrentWorkspace); } + if (fFocus == focus) { + // turns out the window that is supposed to get focus now already has it + UnlockAllWindows(); + } + ServerApp* oldActiveApp = NULL; ServerApp* newActiveApp = NULL;