Windows now receive B_WORKSPACE_ACTIVATED and B_WORKSPACES_CHANGED messages again.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15547 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-12-15 16:42:12 +00:00
parent b3e26f5b8f
commit d0abcc6fd2

View File

@ -590,8 +590,14 @@ Desktop::SetWorkspace(int32 index)
// if it's not already on it
if (fMouseEventWindow->IsNormal()) {
// but only normal windows are following
uint32 oldWorkspaces = fMouseEventWindow->Workspaces();
_Windows(index).AddWindow(fMouseEventWindow);
_Windows(previousIndex).RemoveWindow(fMouseEventWindow);
// send B_WORKSPACES_CHANGED message
fMouseEventWindow->WorkspacesChanged(oldWorkspaces,
fMouseEventWindow->Workspaces());
}
} else {
// make sure it's frontmost
@ -612,6 +618,8 @@ Desktop::SetWorkspace(int32 index)
// store current position in Workspace anchor
window->Anchor(previousIndex).position = window->Frame().LeftTop();
window->WorkspaceActivated(previousIndex, false);
if (window->InWorkspace(index))
continue;
@ -664,6 +672,9 @@ Desktop::SetWorkspace(int32 index)
for (WindowLayer* window = _Windows(index).FirstWindow(); window != NULL;
window = window->NextWindow(index)) {
// send B_WORKSPACE_ACTIVATED message
window->WorkspaceActivated(index, true);
if (window->InWorkspace(previousIndex) || window == fMouseEventWindow) {
// this window was visible before, and is already handled in the above loop
continue;
@ -1361,6 +1372,7 @@ Desktop::SetWindowWorkspaces(WindowLayer* window, uint32 workspaces)
if (window->IsNormal() && workspaces == B_CURRENT_WORKSPACE)
workspaces = workspace_to_workspaces(CurrentWorkspace());
window->WorkspacesChanged(window->Workspaces(), workspaces);
_ChangeWindowWorkspaces(window, window->Workspaces(), workspaces);
UnlockAllWindows();
}