summaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc27
1 files changed, 21 insertions, 6 deletions
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