When activating a window also bring all windows in the stack to the front layer. I used the ActivateWindow method because there is some magic involved when changing the layer position, utilising this method seems to be a safe way to do it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42577 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ac4853b49f
commit
cdb351d4a4
@ -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() : "<none>"));
|
||||
|
||||
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;
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user