* Minor simplification and clarification.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28650 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-11-14 13:44:25 +00:00
parent d02835660f
commit 0c9593acdc

View File

@ -1568,8 +1568,7 @@ Desktop::ActivateWindow(Window* window)
fFront = NULL;
return;
}
if (window->Workspaces() == 0
&& !window->IsFloating() && !window->IsModal())
if (window->Workspaces() == 0 && window->IsNormal())
return;
AutoWriteLocker _(fWindowLock);
@ -1594,7 +1593,7 @@ Desktop::ActivateWindow(Window* window)
}
if (windowOnOtherWorkspace) {
if (window->IsFloating() || window->IsModal()) {
if (!window->IsNormal()) {
// Bring a window to front that this floating window belongs to
Window* front = _LastFocusSubsetWindow(window);
if (front == NULL) {
@ -1734,6 +1733,9 @@ Desktop::ShowWindow(Window* window)
window->SetHidden(false);
fFocusList.AddWindow(window);
// If the window is on the current workspace, we'll show it. Special
// handling for floating windows, as they can only be shown if their
// subset is.
if (window->InWorkspace(fCurrentWorkspace)
|| (window->IsFloating() && _LastFocusSubsetWindow(window) != NULL)) {
_ShowWindow(window, true);