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 bool
WindowArea::_AddWindow(SATWindow* window, SATWindow* after) WindowArea::_AddWindow(SATWindow* window, SATWindow* after)
{ {

View File

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

View File

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