aboutsummaryrefslogtreecommitdiff
path: root/src/CurrentWindowCmd.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2005-07-04 18:18:32 (GMT)
committerfluxgen <fluxgen>2005-07-04 18:18:32 (GMT)
commit1727656e0a36cd9095e173dfa43200ed14c178d1 (patch)
tree200a048b9f7ed888047fb0a4fd82660c349087c6 /src/CurrentWindowCmd.cc
parent9049dd33d31ccc03dd3f130681eb481d2b3ff0e6 (diff)
downloadfluxbox_pavel-1727656e0a36cd9095e173dfa43200ed14c178d1.zip
fluxbox_pavel-1727656e0a36cd9095e173dfa43200ed14c178d1.tar.bz2
cleaning, change getCount to numberOfWorkspace
Diffstat (limited to 'src/CurrentWindowCmd.cc')
-rw-r--r--src/CurrentWindowCmd.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc
index 4db34c1..f6b38aa 100644
--- a/src/CurrentWindowCmd.cc
+++ b/src/CurrentWindowCmd.cc
@@ -47,38 +47,38 @@ void SetHeadCmd::real_execute() {
47} 47}
48 48
49void SendToWorkspaceCmd::real_execute() { 49void SendToWorkspaceCmd::real_execute() {
50 if (m_workspace_num >= 0 && m_workspace_num < fbwindow().screen().getNumberOfWorkspaces()) 50 fbwindow().screen().sendToWorkspace(m_workspace_num, &fbwindow(), false);
51 fbwindow().screen().sendToWorkspace(m_workspace_num, &fbwindow(), false);
52} 51}
53 52
54void SendToNextWorkspaceCmd::real_execute() { 53void SendToNextWorkspaceCmd::real_execute() {
55 const int ws_nr = 54 const int ws_nr =
56 ( fbwindow().screen().currentWorkspaceID() + m_workspace_num ) % 55 ( fbwindow().screen().currentWorkspaceID() + m_workspace_num ) %
57 fbwindow().screen().getNumberOfWorkspaces(); 56 fbwindow().screen().numberOfWorkspaces();
58 fbwindow().screen().sendToWorkspace(ws_nr, &fbwindow(), false); 57 fbwindow().screen().sendToWorkspace(ws_nr, &fbwindow(), false);
59} 58}
60 59
61void SendToPrevWorkspaceCmd::real_execute() { 60void SendToPrevWorkspaceCmd::real_execute() {
62 int ws_nr = fbwindow().screen().currentWorkspaceID() - m_workspace_num; 61 int ws_nr = fbwindow().screen().currentWorkspaceID() - m_workspace_num;
63 if ( ws_nr < 0 ) ws_nr += fbwindow().screen().getNumberOfWorkspaces(); 62 if ( ws_nr < 0 )
63 ws_nr += fbwindow().screen().numberOfWorkspaces();
64 fbwindow().screen().sendToWorkspace(ws_nr, &fbwindow(), false); 64 fbwindow().screen().sendToWorkspace(ws_nr, &fbwindow(), false);
65} 65}
66 66
67void TakeToWorkspaceCmd::real_execute() { 67void TakeToWorkspaceCmd::real_execute() {
68 if (m_workspace_num >= 0 && m_workspace_num < fbwindow().screen().getNumberOfWorkspaces()) 68 fbwindow().screen().sendToWorkspace(m_workspace_num, &fbwindow());
69 fbwindow().screen().sendToWorkspace(m_workspace_num, &fbwindow());
70} 69}
71 70
72void TakeToNextWorkspaceCmd::real_execute() { 71void TakeToNextWorkspaceCmd::real_execute() {
73 unsigned int workspace_num= 72 unsigned int workspace_num=
74 ( fbwindow().screen().currentWorkspaceID() + m_workspace_num ) % 73 ( fbwindow().screen().currentWorkspaceID() + m_workspace_num ) %
75 fbwindow().screen().getNumberOfWorkspaces(); 74 fbwindow().screen().numberOfWorkspaces();
76 fbwindow().screen().sendToWorkspace(workspace_num, &fbwindow()); 75 fbwindow().screen().sendToWorkspace(workspace_num, &fbwindow());
77} 76}
78 77
79void TakeToPrevWorkspaceCmd::real_execute() { 78void TakeToPrevWorkspaceCmd::real_execute() {
80 int workspace_num= fbwindow().screen().currentWorkspaceID() - m_workspace_num; 79 int workspace_num= fbwindow().screen().currentWorkspaceID() - m_workspace_num;
81 if ( workspace_num < 0 ) workspace_num+= fbwindow().screen().getNumberOfWorkspaces(); 80 if ( workspace_num < 0 )
81 workspace_num += fbwindow().screen().numberOfWorkspaces();
82 fbwindow().screen().sendToWorkspace(workspace_num, &fbwindow()); 82 fbwindow().screen().sendToWorkspace(workspace_num, &fbwindow());
83} 83}
84 84