diff options
Diffstat (limited to 'src/CurrentWindowCmd.cc')
-rw-r--r-- | src/CurrentWindowCmd.cc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc index 4320f73..44355aa 100644 --- a/src/CurrentWindowCmd.cc +++ b/src/CurrentWindowCmd.cc | |||
@@ -20,7 +20,7 @@ | |||
20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
21 | // DEALINGS IN THE SOFTWARE. | 21 | // DEALINGS IN THE SOFTWARE. |
22 | 22 | ||
23 | // $Id: CurrentWindowCmd.cc,v 1.8 2003/10/26 12:36:55 fluxgen Exp $ | 23 | // $Id: CurrentWindowCmd.cc,v 1.9 2004/02/20 19:40:31 fluxgen Exp $ |
24 | 24 | ||
25 | #include "CurrentWindowCmd.hh" | 25 | #include "CurrentWindowCmd.hh" |
26 | 26 | ||
@@ -47,6 +47,19 @@ void SendToWorkspaceCmd::real_execute() { | |||
47 | fbwindow().screen().sendToWorkspace(m_workspace_num, &fbwindow()); | 47 | fbwindow().screen().sendToWorkspace(m_workspace_num, &fbwindow()); |
48 | } | 48 | } |
49 | 49 | ||
50 | void SendToNextWorkspaceCmd::real_execute() { | ||
51 | unsigned int workspace_num= | ||
52 | ( fbwindow().screen().currentWorkspaceID() + m_workspace_num ) % | ||
53 | fbwindow().screen().getNumberOfWorkspaces(); | ||
54 | fbwindow().screen().sendToWorkspace(workspace_num, &fbwindow()); | ||
55 | } | ||
56 | |||
57 | void SendToPrevWorkspaceCmd::real_execute() { | ||
58 | int workspace_num= fbwindow().screen().currentWorkspaceID() - m_workspace_num; | ||
59 | if ( workspace_num < 0 ) workspace_num+= fbwindow().screen().getNumberOfWorkspaces(); | ||
60 | fbwindow().screen().sendToWorkspace(workspace_num, &fbwindow()); | ||
61 | } | ||
62 | |||
50 | void WindowHelperCmd::execute() { | 63 | void WindowHelperCmd::execute() { |
51 | WinClient *client = Fluxbox::instance()->getFocusedWindow(); | 64 | WinClient *client = Fluxbox::instance()->getFocusedWindow(); |
52 | if (client && client->fbwindow()) // guarantee that fbwindow() exists too | 65 | if (client && client->fbwindow()) // guarantee that fbwindow() exists too |