- Do the window layout on every resize. This is e.g. needed to do the tab layout.

- Use old ActivateWindow implementation till the Desktop SendBehind question is solved.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38508 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler 2010-09-02 03:05:58 +00:00
parent 41af979eb8
commit 04674450ad
9 changed files with 34 additions and 10 deletions

View File

@ -253,6 +253,7 @@ private:
protected:
SATWindowList fSATWindowList;
LinearSpec fLinearSpec;
private:

View File

@ -456,6 +456,14 @@ SATWindow::JoinCandidates()
}
void
SATWindow::DoWindowLayout()
{
for (int i = 0; i < fSATSnappingBehaviourList.CountItems(); i++)
fSATSnappingBehaviourList.ItemAt(i)->DoWindowLayout();
}
void
SATWindow::DoGroupLayout()
{
@ -464,8 +472,7 @@ SATWindow::DoGroupLayout()
fGroupCookie->DoGroupLayout(this);
for (int i = 0; i < fSATSnappingBehaviourList.CountItems(); i++)
fSATSnappingBehaviourList.ItemAt(i)->DoGroupLayout();
DoWindowLayout();
}

View File

@ -100,6 +100,7 @@ public:
void FindSnappingCandidates();
bool JoinCandidates();
void DoWindowLayout();
void DoGroupLayout();
//! \return the complete window frame including the Decorator

View File

@ -185,6 +185,17 @@ StackAndTile::WindowResized(Window* window)
// after solve the layout update the size constraints of all windows in
// the group
satWindow->UpdateGroupWindowsSize();
// Do a window layout for all windows. TODO: mybe do it a bit more
// efficient
SATGroup* group = satWindow->GetGroup();
if (!group)
return;
for (int i = 0; i < group->CountItems(); i++) {
SATWindow* listWindow = group->WindowAt(i);
if (listWindow != satWindow)
listWindow->DoWindowLayout();
}
}
}
@ -357,15 +368,18 @@ StackAndTile::_ActivateWindow(SATWindow* satWindow)
if (!desktop)
return;
desktop->ActivateWindow(satWindow->GetWindow());
//desktop->ActivateWindow(satWindow->GetWindow());
for (int i = 0; i < group->CountItems(); i++) {
SATWindow* listWindow = group->WindowAt(i);
if (listWindow == satWindow)
continue;
desktop->SendWindowBehind(listWindow->GetWindow(),
satWindow->GetWindow());
//desktop->SendWindowBehind(listWindow->GetWindow(),
// satWindow->GetWindow());
desktop->ActivateWindow(listWindow->GetWindow());
}
desktop->ActivateWindow(satWindow->GetWindow());
}

View File

@ -127,7 +127,7 @@ public:
virtual bool JoinCandidates() = 0;
/*! Update the window tab values, solve the layout and move all windows in
the group accordantly. */
virtual void DoGroupLayout() = 0;
virtual void DoWindowLayout() = 0;
virtual void RemovedFromArea(WindowArea* area) {}
virtual void TabLocationMoved(float location, bool shifting) {}
};

View File

@ -254,7 +254,7 @@ SATStacking::JoinCandidates()
void
SATStacking::DoGroupLayout()
SATStacking::DoWindowLayout()
{
_AdjustWindowTabs();
}

View File

@ -30,7 +30,8 @@ public:
bool FindSnappingCandidates(SATGroup* group);
bool JoinCandidates();
void DoGroupLayout();
void DoWindowLayout();
void RemovedFromArea(WindowArea* area);
void TabLocationMoved(float location, bool shifting);

View File

@ -79,7 +79,7 @@ SATTiling::JoinCandidates()
void
SATTiling::DoGroupLayout()
SATTiling::DoWindowLayout()
{
}

View File

@ -22,7 +22,7 @@ public:
bool FindSnappingCandidates(SATGroup* group);
bool JoinCandidates();
void DoGroupLayout();
void DoWindowLayout();
private:
bool _FindFreeAreaInGroup(SATGroup* group);