aboutsummaryrefslogtreecommitdiff
path: root/src/WinClientUtil.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2006-04-23 17:00:33 (GMT)
committerfluxgen <fluxgen>2006-04-23 17:00:33 (GMT)
commit75d289be65e12ac8c1b36a21ee9db8fee7cf1897 (patch)
tree14ce0593761c5c3e1f331563655bd5af7d127be6 /src/WinClientUtil.cc
parentb0d7010f8bd762aa3eff5ee5a9d5d265ad349c83 (diff)
downloadfluxbox-75d289be65e12ac8c1b36a21ee9db8fee7cf1897.zip
fluxbox-75d289be65e12ac8c1b36a21ee9db8fee7cf1897.tar.bz2
added support for _NET_WM_ALLOWED_ACTIONS and all the _NET_WM_ACTION_*. Added _NET_WM_STATE_MODAL and _NET_WM_WINDOW_TYPE_SPLASH
Diffstat (limited to 'src/WinClientUtil.cc')
-rw-r--r--src/WinClientUtil.cc32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/WinClientUtil.cc b/src/WinClientUtil.cc
new file mode 100644
index 0000000..112360d
--- /dev/null
+++ b/src/WinClientUtil.cc
@@ -0,0 +1,32 @@
1#include "WinClientUtil.hh"
2#include "WinClient.hh"
3
4#include <algorithm>
5
6namespace WinClientUtil {
7
8void 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 = ~0; // unlimited
13 max_height = ~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 == ~0)
25 max_width = 0;
26 if (max_height == ~0)
27 max_height = 0;
28}
29
30}
31
32