* BWindow::Activate() now also unminimizes a window if necessary.
* Removed superfluous white space. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26757 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1796,6 +1796,9 @@ BWindow::Activate(bool active)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (!IsHidden()) {
|
if (!IsHidden()) {
|
||||||
|
fMinimized = false;
|
||||||
|
// activating a window will also unminimize it
|
||||||
|
|
||||||
fLink->StartMessage(AS_ACTIVATE_WINDOW);
|
fLink->StartMessage(AS_ACTIVATE_WINDOW);
|
||||||
fLink->Attach<bool>(active);
|
fLink->Attach<bool>(active);
|
||||||
fLink->Flush();
|
fLink->Flush();
|
||||||
|
|||||||
@@ -1535,6 +1535,13 @@ Desktop::ActivateWindow(Window* window)
|
|||||||
SetWindowWorkspaces(window, workspaces);
|
SetWindowWorkspaces(window, workspaces);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (window->IsMinimized()) {
|
||||||
|
// Unlike WindowAction(), this is called from the application itself,
|
||||||
|
// so we will just unminimize the window here.
|
||||||
|
ShowWindow(window);
|
||||||
|
window->SetMinimized(false);
|
||||||
|
}
|
||||||
|
|
||||||
if (window == FrontWindow()) {
|
if (window == FrontWindow()) {
|
||||||
// see if there is a normal B_AVOID_FRONT window still in front of us
|
// see if there is a normal B_AVOID_FRONT window still in front of us
|
||||||
Window* avoidsFront = window->NextWindow(fCurrentWorkspace);
|
Window* avoidsFront = window->NextWindow(fCurrentWorkspace);
|
||||||
@@ -2389,12 +2396,13 @@ Desktop::WindowAction(int32 windowToken, int32 action)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action == B_BRING_TO_FRONT
|
if (action == B_BRING_TO_FRONT && !window->IsMinimized()) {
|
||||||
&& !window->IsMinimized()) {
|
|
||||||
// the window is visible, we just need to make it the front window
|
// the window is visible, we just need to make it the front window
|
||||||
ActivateWindow(window);
|
ActivateWindow(window);
|
||||||
} else
|
} else {
|
||||||
|
// if not, ask the window if it wants to be unminimized
|
||||||
serverWindow->NotifyMinimize(action == B_MINIMIZE_WINDOW);
|
serverWindow->NotifyMinimize(action == B_MINIMIZE_WINDOW);
|
||||||
|
}
|
||||||
|
|
||||||
UnlockAllWindows();
|
UnlockAllWindows();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user