aboutsummaryrefslogtreecommitdiff
path: root/src/Gnome.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-04-15 00:17:59 (GMT)
committerfluxgen <fluxgen>2003-04-15 00:17:59 (GMT)
commit1aa5ede1b70dfba6519eeaa38101948bbdfea8a2 (patch)
tree7e0b4d0c59e394c879af73a34c62e8f936315c59 /src/Gnome.cc
parentaf077ae1ac6ec99cc1e64bfd3b9f8dcd69301940 (diff)
downloadfluxbox-1aa5ede1b70dfba6519eeaa38101948bbdfea8a2.zip
fluxbox-1aa5ede1b70dfba6519eeaa38101948bbdfea8a2.tar.bz2
fixed client count bug
Diffstat (limited to 'src/Gnome.cc')
-rw-r--r--src/Gnome.cc31
1 files changed, 23 insertions, 8 deletions
diff --git a/src/Gnome.cc b/src/Gnome.cc
index c35c6b8..717cc60 100644
--- a/src/Gnome.cc
+++ b/src/Gnome.cc
@@ -19,13 +19,14 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Gnome.cc,v 1.15 2003/04/14 12:11:59 fluxgen Exp $ 22// $Id: Gnome.cc,v 1.16 2003/04/15 00:17:59 fluxgen Exp $
23 23
24#include "Gnome.hh" 24#include "Gnome.hh"
25 25
26#include "fluxbox.hh" 26#include "fluxbox.hh"
27#include "Window.hh" 27#include "Window.hh"
28#include "Screen.hh" 28#include "Screen.hh"
29#include "WinClient.hh"
29 30
30#include <iostream> 31#include <iostream>
31#include <new> 32#include <new>
@@ -125,10 +126,17 @@ void Gnome::setupWindow(FluxboxWindow &win) {
125void Gnome::updateClientList(BScreen &screen) { 126void Gnome::updateClientList(BScreen &screen) {
126 size_t num=0; 127 size_t num=0;
127 128
128 BScreen::Workspaces::const_iterator workspace_it = screen.getWorkspacesList().begin(); 129 BScreen::Workspaces::const_iterator workspace_it =
129 BScreen::Workspaces::const_iterator workspace_it_end = screen.getWorkspacesList().end(); 130 screen.getWorkspacesList().begin();
131 BScreen::Workspaces::const_iterator workspace_it_end =
132 screen.getWorkspacesList().end();
130 for (; workspace_it != workspace_it_end; ++workspace_it) { 133 for (; workspace_it != workspace_it_end; ++workspace_it) {
131 num += (*workspace_it)->getWindowList().size(); 134 Workspace::Windows::iterator win_it =
135 (*workspace_it)->getWindowList().begin();
136 Workspace::Windows::iterator win_it_end =
137 (*workspace_it)->getWindowList().end();
138 for (; win_it != win_it_end; ++win_it)
139 num += (*win_it)->numClients();
132 } 140 }
133 //int num = getCurrentWorkspace()->getWindowList().size(); 141 //int num = getCurrentWorkspace()->getWindowList().size();
134 142
@@ -143,14 +151,21 @@ void Gnome::updateClientList(BScreen &screen) {
143 for (; workspace_it != workspace_it_end; ++workspace_it) { 151 for (; workspace_it != workspace_it_end; ++workspace_it) {
144 152
145 // Fill in array of window ID's 153 // Fill in array of window ID's
146 Workspace::Windows::const_iterator it = (*workspace_it)->getWindowList().begin(); 154 Workspace::Windows::const_iterator it =
147 Workspace::Windows::const_iterator it_end = (*workspace_it)->getWindowList().end(); 155 (*workspace_it)->getWindowList().begin();
156 Workspace::Windows::const_iterator it_end =
157 (*workspace_it)->getWindowList().end();
148 for (; it != it_end; ++it) { 158 for (; it != it_end; ++it) {
149 // TODO! 159 // TODO!
150 //check if the window don't want to be visible in the list 160 //check if the window don't want to be visible in the list
151 //if (! ( (*it)->getGnomeHints() & WIN_STATE_HIDDEN) ) { 161 //if (! ( (*it)->getGnomeHints() & WIN_STATE_HIDDEN) ) {
152 wl[win++] = (*it)->getClientWindow(); 162 std::list<WinClient *>::iterator client_it =
153 //} 163 (*it)->clientList().begin();
164 std::list<WinClient *>::iterator client_it_end =
165 (*it)->clientList().end();
166 for (; client_it != client_it_end; ++client_it)
167 wl[win++] = (*client_it)->window();
168
154 } 169 }
155 } 170 }
156 //number of windows to show in client list 171 //number of windows to show in client list