SetWorkspace() now also move the subset windows of the mouse event window to
the new workspace - this fixes bug #755. Unlike floating windows, they aren't even redrawn :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18592 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
85e2542930
commit
6474795008
|
@ -751,6 +751,8 @@ Desktop::SetWorkspace(int32 index)
|
|||
_Windows(index).AddWindow(fMouseEventWindow);
|
||||
_Windows(previousIndex).RemoveWindow(fMouseEventWindow);
|
||||
|
||||
_UpdateSubsetWorkspaces(fMouseEventWindow, previousIndex, index);
|
||||
|
||||
// send B_WORKSPACES_CHANGED message
|
||||
fMouseEventWindow->WorkspacesChanged(oldWorkspaces,
|
||||
fMouseEventWindow->Workspaces());
|
||||
|
@ -837,7 +839,8 @@ Desktop::SetWorkspace(int32 index)
|
|||
window->WorkspaceActivated(index, true);
|
||||
|
||||
if (window->InWorkspace(previousIndex)
|
||||
|| (window == fMouseEventWindow && fMouseEventWindow->IsNormal())) {
|
||||
|| (window == fMouseEventWindow && fMouseEventWindow->IsNormal())
|
||||
|| (!window->IsFloating() && !window->IsNormal() && window->HasInSubset(fMouseEventWindow))) {
|
||||
// this window was visible before, and is already handled in the above loop
|
||||
continue;
|
||||
}
|
||||
|
@ -1647,9 +1650,13 @@ Desktop::SetWindowDecoratorSettings(WindowLayer* window,
|
|||
/*!
|
||||
Updates the workspaces of all subset windows with regard to the
|
||||
specifed window.
|
||||
If newIndex is not -1, it will move all subset windows that belong to
|
||||
the specifed window to the new workspace; this form is only called by
|
||||
SetWorkspace().
|
||||
*/
|
||||
void
|
||||
Desktop::_UpdateSubsetWorkspaces(WindowLayer* window)
|
||||
Desktop::_UpdateSubsetWorkspaces(WindowLayer* window, int32 previousIndex,
|
||||
int32 newIndex)
|
||||
{
|
||||
STRACE(("_UpdateSubsetWorkspaces(window %p, %s)\n", window, window->Title()));
|
||||
|
||||
|
@ -1675,6 +1682,10 @@ Desktop::_UpdateSubsetWorkspaces(WindowLayer* window)
|
|||
|
||||
if (subset->HasInSubset(window)) {
|
||||
// adopt the workspace change
|
||||
if (newIndex != -1) {
|
||||
_Windows(newIndex).AddWindow(subset);
|
||||
_Windows(previousIndex).RemoveWindow(subset);
|
||||
} else
|
||||
SetWindowWorkspaces(subset, subset->SubsetWorkspaces());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -184,7 +184,9 @@ class Desktop : public MessageLooper, public ScreenOwner {
|
|||
bool affectsOtherWindows = true);
|
||||
void _HideWindow(WindowLayer* window);
|
||||
|
||||
void _UpdateSubsetWorkspaces(WindowLayer* window);
|
||||
void _UpdateSubsetWorkspaces(WindowLayer* window,
|
||||
int32 previousIndex = -1,
|
||||
int32 newIndex = -1);
|
||||
void _ChangeWindowWorkspaces(WindowLayer* window,
|
||||
uint32 oldWorkspaces, uint32 newWorkspaces);
|
||||
void _BringWindowsToFront(WindowList& windows,
|
||||
|
|
Loading…
Reference in New Issue