summaryrefslogtreecommitdiff
path: root/src/CurrentWindowCmd.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/CurrentWindowCmd.cc')
-rw-r--r--src/CurrentWindowCmd.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc
index 7bc7977..de50c60 100644
--- a/src/CurrentWindowCmd.cc
+++ b/src/CurrentWindowCmd.cc
@@ -53,15 +53,15 @@ void SendToWorkspaceCmd::real_execute() {
53} 53}
54 54
55void SendToNextWorkspaceCmd::real_execute() { 55void SendToNextWorkspaceCmd::real_execute() {
56 const int ws_nr = 56 const int ws_nr =
57 ( fbwindow().screen().currentWorkspaceID() + m_workspace_num ) % 57 ( fbwindow().screen().currentWorkspaceID() + m_workspace_num ) %
58 fbwindow().screen().numberOfWorkspaces(); 58 fbwindow().screen().numberOfWorkspaces();
59 fbwindow().screen().sendToWorkspace(ws_nr, &fbwindow(), false); 59 fbwindow().screen().sendToWorkspace(ws_nr, &fbwindow(), false);
60} 60}
61 61
62void SendToPrevWorkspaceCmd::real_execute() { 62void SendToPrevWorkspaceCmd::real_execute() {
63 int ws_nr = fbwindow().screen().currentWorkspaceID() - m_workspace_num; 63 int ws_nr = fbwindow().screen().currentWorkspaceID() - m_workspace_num;
64 if ( ws_nr < 0 ) 64 if ( ws_nr < 0 )
65 ws_nr += fbwindow().screen().numberOfWorkspaces(); 65 ws_nr += fbwindow().screen().numberOfWorkspaces();
66 fbwindow().screen().sendToWorkspace(ws_nr, &fbwindow(), false); 66 fbwindow().screen().sendToWorkspace(ws_nr, &fbwindow(), false);
67} 67}
@@ -71,15 +71,15 @@ void TakeToWorkspaceCmd::real_execute() {
71} 71}
72 72
73void TakeToNextWorkspaceCmd::real_execute() { 73void TakeToNextWorkspaceCmd::real_execute() {
74 unsigned int workspace_num= 74 unsigned int workspace_num=
75 ( fbwindow().screen().currentWorkspaceID() + m_workspace_num ) % 75 ( fbwindow().screen().currentWorkspaceID() + m_workspace_num ) %
76 fbwindow().screen().numberOfWorkspaces(); 76 fbwindow().screen().numberOfWorkspaces();
77 fbwindow().screen().sendToWorkspace(workspace_num, &fbwindow()); 77 fbwindow().screen().sendToWorkspace(workspace_num, &fbwindow());
78} 78}
79 79
80void TakeToPrevWorkspaceCmd::real_execute() { 80void TakeToPrevWorkspaceCmd::real_execute() {
81 int workspace_num= fbwindow().screen().currentWorkspaceID() - m_workspace_num; 81 int workspace_num= fbwindow().screen().currentWorkspaceID() - m_workspace_num;
82 if ( workspace_num < 0 ) 82 if ( workspace_num < 0 )
83 workspace_num += fbwindow().screen().numberOfWorkspaces(); 83 workspace_num += fbwindow().screen().numberOfWorkspaces();
84 fbwindow().screen().sendToWorkspace(workspace_num, &fbwindow()); 84 fbwindow().screen().sendToWorkspace(workspace_num, &fbwindow());
85} 85}
@@ -125,12 +125,12 @@ ResizeCmd::ResizeCmd(const int step_size_x, const int step_size_y) :
125 m_step_size_x(step_size_x), m_step_size_y(step_size_y) { } 125 m_step_size_x(step_size_x), m_step_size_y(step_size_y) { }
126 126
127void ResizeCmd::real_execute() { 127void ResizeCmd::real_execute() {
128 128
129 int w = std::max<int>(static_cast<int>(fbwindow().width() + 129 int w = std::max<int>(static_cast<int>(fbwindow().width() +
130 m_step_size_x * fbwindow().winClient().width_inc), 130 m_step_size_x * fbwindow().winClient().width_inc),
131 fbwindow().frame().titlebarHeight() * 2 + 10); 131 fbwindow().frame().titlebarHeight() * 2 + 10);
132 int h = std::max<int>(static_cast<int>(fbwindow().height() + 132 int h = std::max<int>(static_cast<int>(fbwindow().height() +
133 m_step_size_y * fbwindow().winClient().height_inc), 133 m_step_size_y * fbwindow().winClient().height_inc),
134 fbwindow().frame().titlebarHeight() + 10); 134 fbwindow().frame().titlebarHeight() + 10);
135 fbwindow().resize(w, h); 135 fbwindow().resize(w, h);
136} 136}
@@ -143,7 +143,7 @@ void MoveToCmd::real_execute() {
143 int y = 0; 143 int y = 0;
144 144
145 const int head = fbwindow().screen().getHead(fbwindow().fbWindow()); 145 const int head = fbwindow().screen().getHead(fbwindow().fbWindow());
146 146
147 if (m_refc & MoveToCmd::LOWER) 147 if (m_refc & MoveToCmd::LOWER)
148 y = fbwindow().screen().maxBottom(head) - fbwindow().height() - 2 * fbwindow().frame().window().borderWidth() - m_step_size_y; 148 y = fbwindow().screen().maxBottom(head) - fbwindow().height() - 2 * fbwindow().frame().window().borderWidth() - m_step_size_y;
149 if (m_refc & MoveToCmd::UPPER) 149 if (m_refc & MoveToCmd::UPPER)
@@ -157,7 +157,7 @@ void MoveToCmd::real_execute() {
157 x = fbwindow().x(); 157 x = fbwindow().x();
158 if (m_refc & MoveToCmd::IGNORE_Y) 158 if (m_refc & MoveToCmd::IGNORE_Y)
159 y = fbwindow().y(); 159 y = fbwindow().y();
160 160
161 fbwindow().move(x, y); 161 fbwindow().move(x, y);
162} 162}
163 163