- 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:
@@ -253,6 +253,7 @@ private:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
SATWindowList fSATWindowList;
|
SATWindowList fSATWindowList;
|
||||||
|
|
||||||
LinearSpec fLinearSpec;
|
LinearSpec fLinearSpec;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -456,6 +456,14 @@ SATWindow::JoinCandidates()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
SATWindow::DoWindowLayout()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < fSATSnappingBehaviourList.CountItems(); i++)
|
||||||
|
fSATSnappingBehaviourList.ItemAt(i)->DoWindowLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SATWindow::DoGroupLayout()
|
SATWindow::DoGroupLayout()
|
||||||
{
|
{
|
||||||
@@ -464,8 +472,7 @@ SATWindow::DoGroupLayout()
|
|||||||
|
|
||||||
fGroupCookie->DoGroupLayout(this);
|
fGroupCookie->DoGroupLayout(this);
|
||||||
|
|
||||||
for (int i = 0; i < fSATSnappingBehaviourList.CountItems(); i++)
|
DoWindowLayout();
|
||||||
fSATSnappingBehaviourList.ItemAt(i)->DoGroupLayout();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ public:
|
|||||||
|
|
||||||
void FindSnappingCandidates();
|
void FindSnappingCandidates();
|
||||||
bool JoinCandidates();
|
bool JoinCandidates();
|
||||||
|
void DoWindowLayout();
|
||||||
void DoGroupLayout();
|
void DoGroupLayout();
|
||||||
|
|
||||||
//! \return the complete window frame including the Decorator
|
//! \return the complete window frame including the Decorator
|
||||||
|
|||||||
@@ -185,6 +185,17 @@ StackAndTile::WindowResized(Window* window)
|
|||||||
// after solve the layout update the size constraints of all windows in
|
// after solve the layout update the size constraints of all windows in
|
||||||
// the group
|
// the group
|
||||||
satWindow->UpdateGroupWindowsSize();
|
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)
|
if (!desktop)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
desktop->ActivateWindow(satWindow->GetWindow());
|
//desktop->ActivateWindow(satWindow->GetWindow());
|
||||||
|
|
||||||
for (int i = 0; i < group->CountItems(); i++) {
|
for (int i = 0; i < group->CountItems(); i++) {
|
||||||
SATWindow* listWindow = group->WindowAt(i);
|
SATWindow* listWindow = group->WindowAt(i);
|
||||||
if (listWindow == satWindow)
|
if (listWindow == satWindow)
|
||||||
continue;
|
continue;
|
||||||
desktop->SendWindowBehind(listWindow->GetWindow(),
|
//desktop->SendWindowBehind(listWindow->GetWindow(),
|
||||||
satWindow->GetWindow());
|
// satWindow->GetWindow());
|
||||||
|
desktop->ActivateWindow(listWindow->GetWindow());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
desktop->ActivateWindow(satWindow->GetWindow());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ public:
|
|||||||
virtual bool JoinCandidates() = 0;
|
virtual bool JoinCandidates() = 0;
|
||||||
/*! Update the window tab values, solve the layout and move all windows in
|
/*! Update the window tab values, solve the layout and move all windows in
|
||||||
the group accordantly. */
|
the group accordantly. */
|
||||||
virtual void DoGroupLayout() = 0;
|
virtual void DoWindowLayout() = 0;
|
||||||
virtual void RemovedFromArea(WindowArea* area) {}
|
virtual void RemovedFromArea(WindowArea* area) {}
|
||||||
virtual void TabLocationMoved(float location, bool shifting) {}
|
virtual void TabLocationMoved(float location, bool shifting) {}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ SATStacking::JoinCandidates()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SATStacking::DoGroupLayout()
|
SATStacking::DoWindowLayout()
|
||||||
{
|
{
|
||||||
_AdjustWindowTabs();
|
_AdjustWindowTabs();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,8 @@ public:
|
|||||||
|
|
||||||
bool FindSnappingCandidates(SATGroup* group);
|
bool FindSnappingCandidates(SATGroup* group);
|
||||||
bool JoinCandidates();
|
bool JoinCandidates();
|
||||||
void DoGroupLayout();
|
void DoWindowLayout();
|
||||||
|
|
||||||
void RemovedFromArea(WindowArea* area);
|
void RemovedFromArea(WindowArea* area);
|
||||||
void TabLocationMoved(float location, bool shifting);
|
void TabLocationMoved(float location, bool shifting);
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ SATTiling::JoinCandidates()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SATTiling::DoGroupLayout()
|
SATTiling::DoWindowLayout()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public:
|
|||||||
|
|
||||||
bool FindSnappingCandidates(SATGroup* group);
|
bool FindSnappingCandidates(SATGroup* group);
|
||||||
bool JoinCandidates();
|
bool JoinCandidates();
|
||||||
void DoGroupLayout();
|
void DoWindowLayout();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool _FindFreeAreaInGroup(SATGroup* group);
|
bool _FindFreeAreaInGroup(SATGroup* group);
|
||||||
|
|||||||
Reference in New Issue
Block a user