Activate only the top window in a group and not all windows. Fixes #6652 and #6616.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42487 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler 2011-07-25 22:26:44 +00:00
parent d24ddec4e4
commit 837ad4a36f
3 changed files with 14 additions and 9 deletions

View File

@ -78,6 +78,13 @@ WindowArea::MoveWindowToPosition(SATWindow* window, int32 index)
}
SATWindow*
WindowArea::TopWindow()
{
return fWindowLayerOrder.ItemAt(fWindowLayerOrder.CountItems() - 1);
}
bool
WindowArea::_AddWindow(SATWindow* window, SATWindow* after)
{

View File

@ -144,6 +144,7 @@ public:
const SATWindowList& LayerOrder() { return fWindowLayerOrder; }
bool MoveWindowToPosition(SATWindow* window,
int32 index);
SATWindow* TopWindow();
Crossing* LeftTopCrossing()
{ return fLeftTopCrossing.Get(); }

View File

@ -502,15 +502,12 @@ StackAndTile::_ActivateWindow(SATWindow* satWindow)
return;
area->MoveToTopLayer(satWindow);
//desktop->ActivateWindow(satWindow->GetWindow());
WindowIterator iter(group);
for (SATWindow* listWindow = iter.NextWindow(); listWindow != NULL;
listWindow = iter.NextWindow()) {
if (listWindow != satWindow)
//desktop->SendWindowBehind(listWindow->GetWindow(),
// satWindow->GetWindow());
desktop->ActivateWindow(listWindow->GetWindow());
const WindowAreaList& areas = group->GetAreaList() ;
for (int32 i = 0; i < areas.CountItems(); i++) {
WindowArea* currentArea = areas.ItemAt(i);
if (currentArea == area)
continue;
desktop->ActivateWindow(currentArea->TopWindow()->GetWindow());
}
desktop->ActivateWindow(satWindow->GetWindow());