diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2010-09-09 13:33:34 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2010-09-09 13:33:34 (GMT) |
commit | 2b9a38cba5ddbe108aff7b0071bc21fbe53f8f39 (patch) | |
tree | 0b275974789ecb3dee606fb383afa55334de5ac8 /src | |
parent | 534db1d4092bae83d95620a18aef3dd362627fae (diff) | |
download | fluxbox_pavel-2b9a38cba5ddbe108aff7b0071bc21fbe53f8f39.zip fluxbox_pavel-2b9a38cba5ddbe108aff7b0071bc21fbe53f8f39.tar.bz2 |
minor cleanup
Diffstat (limited to 'src')
-rw-r--r-- | src/FbCommands.cc | 5 | ||||
-rw-r--r-- | src/WindowState.cc | 6 | ||||
-rw-r--r-- | src/fluxbox.cc | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/FbCommands.cc b/src/FbCommands.cc index 4b40f82..8683711 100644 --- a/src/FbCommands.cc +++ b/src/FbCommands.cc | |||
@@ -253,10 +253,7 @@ RestartFluxboxCmd::RestartFluxboxCmd(const string &cmd):m_cmd(cmd){ | |||
253 | } | 253 | } |
254 | 254 | ||
255 | void RestartFluxboxCmd::execute() { | 255 | void RestartFluxboxCmd::execute() { |
256 | if (m_cmd.empty()) | 256 | Fluxbox::instance()->restart(m_cmd.c_str()); |
257 | Fluxbox::instance()->restart(); | ||
258 | else | ||
259 | Fluxbox::instance()->restart(m_cmd.c_str()); | ||
260 | } | 257 | } |
261 | 258 | ||
262 | REGISTER_COMMAND(reconfigure, FbCommands::ReconfigureFluxboxCmd, void); | 259 | REGISTER_COMMAND(reconfigure, FbCommands::ReconfigureFluxboxCmd, void); |
diff --git a/src/WindowState.cc b/src/WindowState.cc index 1e650d8..b2c76b0 100644 --- a/src/WindowState.cc +++ b/src/WindowState.cc | |||
@@ -170,6 +170,8 @@ void SizeHints::reset(const XSizeHints &sizehint) { | |||
170 | min_height = base_height; | 170 | min_height = base_height; |
171 | } | 171 | } |
172 | 172 | ||
173 | namespace { | ||
174 | |||
173 | void closestPointToAspect(unsigned int &ret_x, unsigned int &ret_y, | 175 | void closestPointToAspect(unsigned int &ret_x, unsigned int &ret_y, |
174 | unsigned int point_x, unsigned int point_y, | 176 | unsigned int point_x, unsigned int point_y, |
175 | unsigned int aspect_x, unsigned int aspect_y) { | 177 | unsigned int aspect_x, unsigned int aspect_y) { |
@@ -187,7 +189,9 @@ unsigned int increaseToMultiple(unsigned int val, unsigned int inc) { | |||
187 | unsigned int decreaseToMultiple(unsigned int val, unsigned int inc) { | 189 | unsigned int decreaseToMultiple(unsigned int val, unsigned int inc) { |
188 | return val % inc ? val - (val % inc) : val; | 190 | return val % inc ? val - (val % inc) : val; |
189 | } | 191 | } |
190 | 192 | ||
193 | } // end of anonymous namespace | ||
194 | |||
191 | /** | 195 | /** |
192 | * Changes width and height to the nearest (lower) value | 196 | * Changes width and height to the nearest (lower) value |
193 | * that conforms to it's size hints. | 197 | * that conforms to it's size hints. |
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index d55029b..ea827f2 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc | |||
@@ -1216,7 +1216,7 @@ void Fluxbox::restart(const char *prog) { | |||
1216 | 1216 | ||
1217 | m_restarting = true; | 1217 | m_restarting = true; |
1218 | 1218 | ||
1219 | if (prog) { | 1219 | if (prog && *prog != '\0') { |
1220 | m_restart_argument = prog; | 1220 | m_restart_argument = prog; |
1221 | } | 1221 | } |
1222 | } | 1222 | } |