diff options
author | markt <markt> | 2007-10-13 21:51:37 (GMT) |
---|---|---|
committer | markt <markt> | 2007-10-13 21:51:37 (GMT) |
commit | a59428d67a95a9df16554962f0a6257d6378328a (patch) | |
tree | f856ed9300c34f7a17d499f22d895610cfbc08e5 /src/WinClientUtil.cc | |
parent | 41b5c6dadb1f474675660cef18b812d4c2338ed2 (diff) | |
download | fluxbox_pavel-a59428d67a95a9df16554962f0a6257d6378328a.zip fluxbox_pavel-a59428d67a95a9df16554962f0a6257d6378328a.tar.bz2 |
merged changes from pre-devel
Diffstat (limited to 'src/WinClientUtil.cc')
-rw-r--r-- | src/WinClientUtil.cc | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/WinClientUtil.cc b/src/WinClientUtil.cc deleted file mode 100644 index a6460a2..0000000 --- a/src/WinClientUtil.cc +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | #include "WinClientUtil.hh" | ||
2 | #include "WinClient.hh" | ||
3 | |||
4 | #include <algorithm> | ||
5 | |||
6 | namespace WinClientUtil { | ||
7 | |||
8 | void maxSize(const FluxboxWindow::ClientList &clients, | ||
9 | unsigned int &max_width, unsigned int &max_height) { | ||
10 | FluxboxWindow::ClientList::const_iterator it = clients.begin(); | ||
11 | FluxboxWindow::ClientList::const_iterator it_end = clients.end(); | ||
12 | max_width = (unsigned int) ~0; // unlimited | ||
13 | max_height = (unsigned int) ~0; // unlimited | ||
14 | for (; it != it_end; ++it) { | ||
15 | // special case for max height/width == 0 | ||
16 | // 0 indicates unlimited size, so we skip them | ||
17 | // and set max size to 0 if max size == ~0 after the loop | ||
18 | if ((*it)->maxHeight() != 0) | ||
19 | max_height = std::min( (*it)->maxHeight(), max_height ); | ||
20 | if ((*it)->maxWidth() != 0) | ||
21 | max_width = std::min( (*it)->maxWidth(), max_width ); | ||
22 | } | ||
23 | |||
24 | if (max_width == (unsigned int) ~0) | ||
25 | max_width = 0; | ||
26 | if (max_height == (unsigned int) ~0) | ||
27 | max_height = 0; | ||
28 | } | ||
29 | |||
30 | } | ||
31 | |||
32 | |||