Only remove a window from the S&T group when the hide event is not triggered by a minimize call.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42611 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler 2011-08-10 00:03:25 +00:00
parent e0bc3d9e2b
commit cd67c205ff
6 changed files with 14 additions and 11 deletions

View File

@ -1261,7 +1261,7 @@ Desktop::ShowWindow(Window* window)
void
Desktop::HideWindow(Window* window)
Desktop::HideWindow(Window* window, bool fromMinimize)
{
if (window->IsHidden())
return;
@ -1310,7 +1310,7 @@ Desktop::HideWindow(Window* window)
}
}
NotifyWindowHidden(window);
NotifyWindowHidden(window, fromMinimize);
UnlockAllWindows();
@ -1326,7 +1326,7 @@ Desktop::MinimizeWindow(Window* window, bool minimize)
return;
if (minimize && !window->IsHidden()) {
HideWindow(window);
HideWindow(window, true);
window->SetMinimized(minimize);
NotifyWindowMinimized(window, minimize);
} else if (!minimize && window->IsHidden()) {

View File

@ -166,7 +166,8 @@ public:
Window* behindOf = NULL);
void ShowWindow(Window* window);
void HideWindow(Window* window);
void HideWindow(Window* window,
bool fromMinimize = false);
void MinimizeWindow(Window* window, bool minimize);
void MoveWindowBy(Window* window, float x, float y,

View File

@ -230,7 +230,7 @@ DesktopObservable::NotifyWindowWorkspacesChanged(Window* window,
void
DesktopObservable::NotifyWindowHidden(Window* window)
DesktopObservable::NotifyWindowHidden(Window* window, bool fromMinimize)
{
if (fWeAreInvoking)
return;
@ -238,7 +238,7 @@ DesktopObservable::NotifyWindowHidden(Window* window)
for (DesktopListener* listener = fDesktopListenerList.First();
listener != NULL; listener = fDesktopListenerList.GetNext(listener))
listener->WindowHidden(window);
listener->WindowHidden(window, fromMinimize);
}

View File

@ -55,7 +55,8 @@ public:
Window* behindOf) = 0;
virtual void WindowWorkspacesChanged(Window* window,
uint32 workspaces) = 0;
virtual void WindowHidden(Window* window) = 0;
virtual void WindowHidden(Window* window,
bool fromMinimize) = 0;
virtual void WindowMinimized(Window* window,
bool minimize) = 0;
@ -112,7 +113,8 @@ public:
Window* behindOf);
void NotifyWindowWorkspacesChanged(Window* window,
uint32 workspaces);
void NotifyWindowHidden(Window* window);
void NotifyWindowHidden(Window* window,
bool fromMinimize);
void NotifyWindowMinimized(Window* window,
bool minimize);

View File

@ -349,7 +349,7 @@ StackAndTile::WindowWorkspacesChanged(Window* window, uint32 workspaces)
void
StackAndTile::WindowHidden(Window* window)
StackAndTile::WindowHidden(Window* window, bool fromMinimize)
{
SATWindow* satWindow = GetSATWindow(window);
if (satWindow == NULL)
@ -357,7 +357,7 @@ StackAndTile::WindowHidden(Window* window)
SATGroup* group = satWindow->GetGroup();
if (group == NULL)
return;
if (group->CountItems() > 1)
if (fromMinimize == false && group->CountItems() > 1)
group->RemoveWindow(satWindow);
}

View File

@ -72,7 +72,7 @@ public:
Window* behindOf);
virtual void WindowWorkspacesChanged(Window* window,
uint32 workspaces);
virtual void WindowHidden(Window* window);
virtual void WindowHidden(Window* window, bool fromMinimize);
virtual void WindowMinimized(Window* window, bool minimize);
virtual void WindowTabLocationChanged(Window* window,