aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2008-08-15 17:38:41 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2008-08-15 17:38:41 (GMT)
commit1d8dfcdf9ad5405f4eef18dc009ce8cfe6d27f29 (patch)
treee69620e1f7e0a3c2173b71e7675b22b9fbf79d06
parent1056474e1d2b6a437051a9ef6eb450df599998c8 (diff)
downloadfluxbox-1d8dfcdf9ad5405f4eef18dc009ce8cfe6d27f29.zip
fluxbox-1d8dfcdf9ad5405f4eef18dc009ce8cfe6d27f29.tar.bz2
cosmetic api change
-rw-r--r--src/Ewmh.cc2
-rw-r--r--src/Window.cc27
-rw-r--r--src/Window.hh2
3 files changed, 23 insertions, 8 deletions
diff --git a/src/Ewmh.cc b/src/Ewmh.cc
index 3453b7e..5db7478 100644
--- a/src/Ewmh.cc
+++ b/src/Ewmh.cc
@@ -1389,7 +1389,7 @@ void Ewmh::updateActions(FluxboxWindow &win) {
1389 actions.push_back(m_net->wm_action_minimize); 1389 actions.push_back(m_net->wm_action_minimize);
1390 1390
1391 unsigned int max_width, max_height; 1391 unsigned int max_width, max_height;
1392 win.maxSize(max_width, max_height); 1392 win.getMaxSize(&max_width, &max_height);
1393 1393
1394 // if unlimited max width we can maximize horizontal 1394 // if unlimited max width we can maximize horizontal
1395 if (max_width == 0) { 1395 if (max_width == 0) {
diff --git a/src/Window.cc b/src/Window.cc
index cf9fa81..43dc311 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -1261,18 +1261,33 @@ void FluxboxWindow::moveResizeForClient(int new_x, int new_y,
1261 1261
1262} 1262}
1263 1263
1264void FluxboxWindow::maxSize(unsigned int &width, unsigned int &height) const { 1264void FluxboxWindow::getMaxSize(unsigned int* width, unsigned int* height) const {
1265
1266 if (!width || !height)
1267 return;
1268
1265 ClientList::const_iterator it = clientList().begin(); 1269 ClientList::const_iterator it = clientList().begin();
1266 ClientList::const_iterator it_end = clientList().end(); 1270 ClientList::const_iterator it_end = clientList().end();
1267 width = height = 0; // unlimited 1271
1272 unsigned int w;
1273 unsigned int h;
1274
1275 w = h = 0; // unlimited
1276
1268 for (; it != it_end; ++it) { 1277 for (; it != it_end; ++it) {
1269 // special case for max height/width == 0 1278 // special case for max height/width == 0
1270 // 0 indicates unlimited size, so we skip them 1279 // 0 indicates unlimited size, so we skip them
1271 if (!height || (*it)->maxHeight() && height > (*it)->maxHeight()) 1280 if (h || (*it)->maxHeight() && h > (*it)->maxHeight())
1272 height = (*it)->maxHeight(); 1281 h = (*it)->maxHeight();
1273 if (!width || (*it)->maxWidth() && width > (*it)->maxWidth()) 1282 if (!w || (*it)->maxWidth() && w > (*it)->maxWidth())
1274 width = (*it)->maxWidth(); 1283 w = (*it)->maxWidth();
1275 } 1284 }
1285
1286 if (width)
1287 *width = w;
1288
1289 if (height)
1290 *height = h;
1276} 1291}
1277 1292
1278// returns whether the focus was "set" to this window 1293// returns whether the focus was "set" to this window
diff --git a/src/Window.hh b/src/Window.hh
index 3c26530..d533dfc 100644
--- a/src/Window.hh
+++ b/src/Window.hh
@@ -305,7 +305,7 @@ public:
305 * @param width will be filled in with maximum width 305 * @param width will be filled in with maximum width
306 * @param height will be filled in with maximum height 306 * @param height will be filled in with maximum height
307 */ 307 */
308 void maxSize(unsigned int &width, unsigned int &height) const; 308 void getMaxSize(unsigned int* width, unsigned int* height) const;
309 void setWorkspace(int n); 309 void setWorkspace(int n);
310 void updateFunctions(); 310 void updateFunctions();
311 void restoreAttributes(); 311 void restoreAttributes();