* Fix decorator reloading of windows in a stack. When reloading the decorator all tabs have to be added to the decorator, the focus and the top layer tab must be set. The decorator does not know about the window and the window stack, thus the window has to do it itself.

* Add Joseph Groover to the author list. 



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42768 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler 2011-09-25 23:04:43 +00:00
parent 28ff5413dd
commit 2ccad1f632
2 changed files with 23 additions and 3 deletions

View File

@ -587,14 +587,24 @@ Window::ReloadDecor()
if (stack == NULL)
return false;
// only reload the window at the first position
if (stack->WindowAt(0) != this)
return true;
if (fLook != B_NO_BORDER_WINDOW_LOOK) {
// we need a new decorator
decorator = gDecorManager.AllocateDecorator(this);
if (decorator == NULL)
return false;
int32 index = PositionInStack();
if (IsFocus())
decorator->SetFocus(index, true);
// add all tabs to the decorator
for (int32 i = 1; i < stack->CountWindows(); i++) {
Window* window = stack->WindowAt(i);
BRegion dirty;
DesktopSettings settings(fDesktop);
decorator->AddTab(settings, window->Title(), window->Look(),
window->Flags(), -1, &dirty);
}
}
windowBehaviour = gDecorManager.AllocateWindowBehaviour(this);
@ -608,6 +618,15 @@ Window::ReloadDecor()
delete fWindowBehaviour;
fWindowBehaviour = windowBehaviour;
// set the correct focus and top layer tab
for (int32 i = 0; i < stack->CountWindows(); i++) {
Window* window = stack->WindowAt(i);
if (window->IsFocus())
decorator->SetFocus(i, true);
if (window == stack->TopLayerWindow())
decorator->SetTopTap(i);
}
return true;
}

View File

@ -5,6 +5,7 @@
* Author:
* DarkWyrm <bpmagic@columbus.rr.com>
* Clemens Zeidler <haiku@clemens-zeidler.de>
* Joseph Groover <looncraz@satx.rr.com>
*/
#ifndef DECOR_MANAGER_H
#define DECOR_MANAGER_H