diff --git a/src/servers/app/Desktop.cpp b/src/servers/app/Desktop.cpp index 2cc554f0e0..8c04962bc8 100644 --- a/src/servers/app/Desktop.cpp +++ b/src/servers/app/Desktop.cpp @@ -1036,11 +1036,21 @@ Desktop::SelectWindow(Window* window) of their subset. */ void -Desktop::ActivateWindow(Window* window) +Desktop::ActivateWindow(Window* window, bool activateStack) { STRACE(("ActivateWindow(%p, %s)\n", window, window ? window->Title() : "")); + WindowStack* stack = window->GetWindowStack(); + if (activateStack && stack != NULL) { + for (int32 i = 0; i < stack->CountWindows(); i++) { + Window* win = stack->LayerOrder().ItemAt(i); + if (window == win) + continue; + ActivateWindow(win, false); + } + } + if (window == NULL) { fBack = NULL; fFront = NULL; diff --git a/src/servers/app/Desktop.h b/src/servers/app/Desktop.h index c3682e9a45..033a50e8a1 100644 --- a/src/servers/app/Desktop.h +++ b/src/servers/app/Desktop.h @@ -160,7 +160,8 @@ public: // Window methods void SelectWindow(Window* window); - void ActivateWindow(Window* window); + void ActivateWindow(Window* window, + bool activateStack = true); void SendWindowBehind(Window* window, Window* behindOf = NULL);