* Unified the Desktop and ServerApp AS_ACTIVATE_WORKSPACE to work in the same
way. * Use that newly exposed feature of taking the focus window to the new workspace when using the Ctrl-Alt-Shift-Arrow shortcut. * This fixes #5675. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36585 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -804,6 +804,7 @@ activate_workspace(int32 workspace)
|
|||||||
BPrivate::AppServerLink link;
|
BPrivate::AppServerLink link;
|
||||||
link.StartMessage(AS_ACTIVATE_WORKSPACE);
|
link.StartMessage(AS_ACTIVATE_WORKSPACE);
|
||||||
link.Attach<int32>(workspace);
|
link.Attach<int32>(workspace);
|
||||||
|
link.Attach<bool>(false);
|
||||||
link.Flush();
|
link.Flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2001-2009, Haiku.
|
* Copyright 2001-2010, Haiku.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -941,22 +941,11 @@ BWindow::DispatchMessage(BMessage* msg, BHandler* target)
|
|||||||
|
|
||||||
int32 next = nextColumn + nextRow * columns;
|
int32 next = nextColumn + nextRow * columns;
|
||||||
if (next != current) {
|
if (next != current) {
|
||||||
uint32 workspaces = 0;
|
BPrivate::AppServerLink link;
|
||||||
if (takeMeThere) {
|
link.StartMessage(AS_ACTIVATE_WORKSPACE);
|
||||||
workspaces = Workspaces() | (1 << next);
|
link.Attach<int32>(next);
|
||||||
|
link.Attach<bool>(true);
|
||||||
// add the next workspaces to the workspaces
|
link.Flush();
|
||||||
if (workspaces != Workspaces())
|
|
||||||
SetWorkspaces(workspaces);
|
|
||||||
}
|
|
||||||
|
|
||||||
// switch to it
|
|
||||||
activate_workspace(next);
|
|
||||||
|
|
||||||
if (takeMeThere && workspaces != B_ALL_WORKSPACES) {
|
|
||||||
workspaces &= ~(1 << current);
|
|
||||||
SetWorkspaces(workspaces);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -910,7 +910,10 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
|||||||
int32 index;
|
int32 index;
|
||||||
link.Read<int32>(&index);
|
link.Read<int32>(&index);
|
||||||
|
|
||||||
fDesktop->SetWorkspace(index);
|
bool takeFocusWindowThere;
|
||||||
|
link.Read<bool>(&takeFocusWindowThere);
|
||||||
|
|
||||||
|
fDesktop->SetWorkspace(index, takeFocusWindowThere);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user