aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CurrentWindowCmd.cc26
-rw-r--r--src/Workspace.hh26
2 files changed, 26 insertions, 26 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
diff --git a/src/Workspace.hh b/src/Workspace.hh
index 3415f47..135ac4d 100644
--- a/src/Workspace.hh
+++ b/src/Workspace.hh
@@ -22,8 +22,8 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25#ifndef WORKSPACE_HH 25#ifndef WORKSPACE_HH
26#define WORKSPACE_HH 26#define WORKSPACE_HH
27 27
28 28
29 29
@@ -42,7 +42,7 @@ class FluxboxWindow;
42class WinClient; 42class WinClient;
43 43
44/** 44/**
45 Handles a single workspace 45 Handles a single workspace
46*/ 46*/
47class Workspace:private FbTk::NotCopyable, private FbTk::Observer { 47class Workspace:private FbTk::NotCopyable, private FbTk::Observer {
48public: 48public:
@@ -51,7 +51,7 @@ public:
51 Workspace(BScreen &screen, FbTk::MultLayers &layermanager, const std::string &name, 51 Workspace(BScreen &screen, FbTk::MultLayers &layermanager, const std::string &name,
52 unsigned int workspaceid = 0); 52 unsigned int workspaceid = 0);
53 ~Workspace(); 53 ~Workspace();
54 54
55 void setLastFocusedWindow(FluxboxWindow *w); 55 void setLastFocusedWindow(FluxboxWindow *w);
56 56
57 /// Set workspace name 57 /// Set workspace name
@@ -66,19 +66,19 @@ public:
66 void updateClientmenu(); 66 void updateClientmenu();
67 67
68 BScreen &screen() { return m_screen; } 68 BScreen &screen() { return m_screen; }
69 const BScreen &screen() const { return m_screen; } 69 const BScreen &screen() const { return m_screen; }
70 70
71 FluxboxWindow *lastFocusedWindow() { return m_lastfocus; } 71 FluxboxWindow *lastFocusedWindow() { return m_lastfocus; }
72 const FluxboxWindow *lastFocusedWindow() const { return m_lastfocus; } 72 const FluxboxWindow *lastFocusedWindow() const { return m_lastfocus; }
73 73
74 inline FbTk::Menu &menu() { return m_clientmenu; } 74 FbTk::Menu &menu() { return m_clientmenu; }
75 inline const FbTk::Menu &menu() const { return m_clientmenu; } 75 const FbTk::Menu &menu() const { return m_clientmenu; }
76 /// name of this workspace 76 /// name of this workspace
77 inline const std::string &name() const { return m_name; } 77 const std::string &name() const { return m_name; }
78 /** 78 /**
79 @return the number of this workspace, note: obsolete, should be in BScreen 79 @return the number of this workspace, note: obsolete, should be in BScreen
80 */ 80 */
81 inline unsigned int workspaceID() const { return m_id; } 81 unsigned int workspaceID() const { return m_id; }
82 82
83 const Windows &windowList() const { return m_windowlist; } 83 const Windows &windowList() const { return m_windowlist; }
84 Windows &windowList() { return m_windowlist; } 84 Windows &windowList() { return m_windowlist; }
@@ -98,14 +98,14 @@ private:
98 98
99 typedef std::vector<std::string> Group; 99 typedef std::vector<std::string> Group;
100 typedef std::vector<Group> GroupList; 100 typedef std::vector<Group> GroupList;
101 101
102 static GroupList m_groups; ///< handle auto groupings 102 static GroupList m_groups; ///< handle auto groupings
103 103
104 FbTk::MultLayers &m_layermanager; 104 FbTk::MultLayers &m_layermanager;
105 Windows m_windowlist; 105 Windows m_windowlist;
106 106
107 std::string m_name; ///< name of this workspace 107 std::string m_name; ///< name of this workspace
108 unsigned int m_id; ///< id, obsolete, this should be in BScreen 108 unsigned int m_id; ///< id, obsolete, this should be in BScreen
109 109
110}; 110};
111 111