diff options
author | fluxgen <fluxgen> | 2002-02-21 12:03:40 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-02-21 12:03:40 (GMT) |
commit | ef91b604e6bef6cf54481ba84607aec96b43bd78 (patch) | |
tree | 25383b61036139ad134411d2492806aab7ec9e22 /src/Screen.cc | |
parent | 0d76989e392fb7950c394fb6df6151f95b36ee89 (diff) | |
download | fluxbox-ef91b604e6bef6cf54481ba84607aec96b43bd78.zip fluxbox-ef91b604e6bef6cf54481ba84607aec96b43bd78.tar.bz2 |
count all clients in all workspaces
Diffstat (limited to 'src/Screen.cc')
-rw-r--r-- | src/Screen.cc | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index c5ad81e..f942837 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Screen.cc,v 1.28 2002/02/21 00:38:51 fluxgen Exp $ | 25 | // $Id: Screen.cc,v 1.29 2002/02/21 12:03:40 fluxgen Exp $ |
26 | 26 | ||
27 | // stupid macros needed to access some functions in version 2 of the GNU C | 27 | // stupid macros needed to access some functions in version 2 of the GNU C |
28 | // library | 28 | // library |
@@ -1768,19 +1768,30 @@ void BScreen::initGnomeAtoms(void) { | |||
1768 | } | 1768 | } |
1769 | 1769 | ||
1770 | void BScreen::updateGnomeClientList() { | 1770 | void BScreen::updateGnomeClientList() { |
1771 | int num = getCurrentWorkspace()->getWindowList().size(); | 1771 | int num=0; |
1772 | Workspaces::iterator workspace_it = workspacesList.begin(); | ||
1773 | Workspaces::iterator workspace_it_end = workspacesList.end(); | ||
1774 | for (; workspace_it != workspace_it_end; ++workspace_it) { | ||
1775 | num += (*workspace_it)->getWindowList().size(); | ||
1776 | } | ||
1777 | //int num = getCurrentWorkspace()->getWindowList().size(); | ||
1778 | |||
1772 | Window *wl = new Window[num]; | 1779 | Window *wl = new Window[num]; |
1773 | // Fill in array of window ID's | 1780 | workspace_it = workspacesList.begin(); |
1774 | Workspace::Windows::iterator it = getCurrentWorkspace()->getWindowList().begin(); | ||
1775 | Workspace::Windows::iterator it_end = getCurrentWorkspace()->getWindowList().end(); | ||
1776 | int win=0; | 1781 | int win=0; |
1777 | for (; it != it_end; ++it) { | 1782 | for (; workspace_it != workspace_it_end; ++workspace_it) { |
1778 | //check if the window don't want to be visible in the list | 1783 | |
1779 | if (! ( (*it)->getGnomeHints() & FluxboxWindow::WIN_STATE_HIDDEN) ) { | 1784 | // Fill in array of window ID's |
1780 | wl[win++] = (*it)->getClientWindow(); | 1785 | Workspace::Windows::iterator it = (*workspace_it)->getWindowList().begin(); |
1786 | Workspace::Windows::iterator it_end = (*workspace_it)->getWindowList().end(); | ||
1787 | for (; it != it_end; ++it) { | ||
1788 | //check if the window don't want to be visible in the list | ||
1789 | if (! ( (*it)->getGnomeHints() & FluxboxWindow::WIN_STATE_HIDDEN) ) { | ||
1790 | wl[win++] = (*it)->getClientWindow(); | ||
1791 | } | ||
1781 | } | 1792 | } |
1782 | } | 1793 | } |
1783 | 1794 | //number of windows to show in client list | |
1784 | num = win; | 1795 | num = win; |
1785 | XChangeProperty(getBaseDisplay()->getXDisplay(), | 1796 | XChangeProperty(getBaseDisplay()->getXDisplay(), |
1786 | getRootWindow(), getBaseDisplay()->getGnomeClientListAtom(), XA_CARDINAL, 32, | 1797 | getRootWindow(), getBaseDisplay()->getGnomeClientListAtom(), XA_CARDINAL, 32, |