summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/WorkspaceCmd.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/WorkspaceCmd.cc b/src/WorkspaceCmd.cc
index b040fdd..9859dd6 100644
--- a/src/WorkspaceCmd.cc
+++ b/src/WorkspaceCmd.cc
@@ -103,8 +103,15 @@ JumpToWorkspaceCmd::JumpToWorkspaceCmd(int workspace_num):m_workspace_num(worksp
103 103
104void JumpToWorkspaceCmd::execute() { 104void JumpToWorkspaceCmd::execute() {
105 BScreen *screen = Fluxbox::instance()->mouseScreen(); 105 BScreen *screen = Fluxbox::instance()->mouseScreen();
106 if (screen != 0) 106 if (screen != 0) {
107 screen->changeWorkspaceID(m_workspace_num); 107 int num = screen->numberOfWorkspaces();
108 int actual = m_workspace_num;
109 // we need an extra +1, since it's subtracted in FbCommandFactory
110 if (actual < 0) actual += num+1;
111 if (actual < 0) actual = 0;
112 if (actual >= num) actual = num - 1;
113 screen->changeWorkspaceID(actual);
114 }
108} 115}
109 116
110 117