aboutsummaryrefslogtreecommitdiff
path: root/src/CurrentWindowCmd.cc
diff options
context:
space:
mode:
authormathias <mathias>2005-06-15 09:48:46 (GMT)
committermathias <mathias>2005-06-15 09:48:46 (GMT)
commitcdc4338c6b7175e0c2654e42a01ae575722f4fd1 (patch)
tree3141c97a59c1213aeb8ab7a674dfba3512cf9311 /src/CurrentWindowCmd.cc
parentacaa58309364238371dec1c30d8fe5097843fd57 (diff)
downloadfluxbox-cdc4338c6b7175e0c2654e42a01ae575722f4fd1.zip
fluxbox-cdc4338c6b7175e0c2654e42a01ae575722f4fd1.tar.bz2
Fixes #1213003, SendToWorkspace shouldnt follow
SendToWorkspace and the rest are putting the window onto the new workspace silently, TakeToWorkspace warps to the new workspace with the window.
Diffstat (limited to 'src/CurrentWindowCmd.cc')
-rw-r--r--src/CurrentWindowCmd.cc22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc
index ba3af0d..834dcad 100644
--- a/src/CurrentWindowCmd.cc
+++ b/src/CurrentWindowCmd.cc
@@ -48,17 +48,35 @@ void SetHeadCmd::real_execute() {
48 48
49void SendToWorkspaceCmd::real_execute() { 49void SendToWorkspaceCmd::real_execute() {
50 if (m_workspace_num >= 0 && m_workspace_num < fbwindow().screen().getNumberOfWorkspaces()) 50 if (m_workspace_num >= 0 && m_workspace_num < fbwindow().screen().getNumberOfWorkspaces())
51 fbwindow().screen().sendToWorkspace(m_workspace_num, &fbwindow()); 51 fbwindow().screen().sendToWorkspace(m_workspace_num, &fbwindow(), false);
52} 52}
53 53
54void SendToNextWorkspaceCmd::real_execute() { 54void SendToNextWorkspaceCmd::real_execute() {
55 const int ws_nr =
56 ( fbwindow().screen().currentWorkspaceID() + m_workspace_num ) %
57 fbwindow().screen().getNumberOfWorkspaces();
58 fbwindow().screen().sendToWorkspace(ws_nr, &fbwindow(), false);
59}
60
61void SendToPrevWorkspaceCmd::real_execute() {
62 int ws_nr = fbwindow().screen().currentWorkspaceID() - m_workspace_num;
63 if ( ws_nr < 0 ) ws_nr += fbwindow().screen().getNumberOfWorkspaces();
64 fbwindow().screen().sendToWorkspace(ws_nr, &fbwindow(), false);
65}
66
67void TakeToWorkspaceCmd::real_execute() {
68 if (m_workspace_num >= 0 && m_workspace_num < fbwindow().screen().getNumberOfWorkspaces())
69 fbwindow().screen().sendToWorkspace(m_workspace_num, &fbwindow());
70}
71
72void TakeToNextWorkspaceCmd::real_execute() {
55 unsigned int workspace_num= 73 unsigned int workspace_num=
56 ( fbwindow().screen().currentWorkspaceID() + m_workspace_num ) % 74 ( fbwindow().screen().currentWorkspaceID() + m_workspace_num ) %
57 fbwindow().screen().getNumberOfWorkspaces(); 75 fbwindow().screen().getNumberOfWorkspaces();
58 fbwindow().screen().sendToWorkspace(workspace_num, &fbwindow()); 76 fbwindow().screen().sendToWorkspace(workspace_num, &fbwindow());
59} 77}
60 78
61void SendToPrevWorkspaceCmd::real_execute() { 79void TakeToPrevWorkspaceCmd::real_execute() {
62 int workspace_num= fbwindow().screen().currentWorkspaceID() - m_workspace_num; 80 int workspace_num= fbwindow().screen().currentWorkspaceID() - m_workspace_num;
63 if ( workspace_num < 0 ) workspace_num+= fbwindow().screen().getNumberOfWorkspaces(); 81 if ( workspace_num < 0 ) workspace_num+= fbwindow().screen().getNumberOfWorkspaces();
64 fbwindow().screen().sendToWorkspace(workspace_num, &fbwindow()); 82 fbwindow().screen().sendToWorkspace(workspace_num, &fbwindow());