diff options
author | fluxgen <fluxgen> | 2003-04-15 00:17:59 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-04-15 00:17:59 (GMT) |
commit | 1aa5ede1b70dfba6519eeaa38101948bbdfea8a2 (patch) | |
tree | 7e0b4d0c59e394c879af73a34c62e8f936315c59 | |
parent | af077ae1ac6ec99cc1e64bfd3b9f8dcd69301940 (diff) | |
download | fluxbox-1aa5ede1b70dfba6519eeaa38101948bbdfea8a2.zip fluxbox-1aa5ede1b70dfba6519eeaa38101948bbdfea8a2.tar.bz2 |
fixed client count bug
-rw-r--r-- | src/Ewmh.cc | 29 | ||||
-rw-r--r-- | src/Gnome.cc | 31 |
2 files changed, 44 insertions, 16 deletions
diff --git a/src/Ewmh.cc b/src/Ewmh.cc index c17bd92..92c6dbd 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc | |||
@@ -19,7 +19,7 @@ | |||
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: Ewmh.cc,v 1.15 2003/04/14 12:11:21 fluxgen Exp $ | 22 | // $Id: Ewmh.cc,v 1.16 2003/04/15 00:14:24 fluxgen Exp $ |
23 | 23 | ||
24 | #include "Ewmh.hh" | 24 | #include "Ewmh.hh" |
25 | 25 | ||
@@ -128,10 +128,19 @@ void Ewmh::setupWindow(FluxboxWindow &win) { | |||
128 | void Ewmh::updateClientList(BScreen &screen) { | 128 | void Ewmh::updateClientList(BScreen &screen) { |
129 | size_t num=0; | 129 | size_t num=0; |
130 | 130 | ||
131 | BScreen::Workspaces::const_iterator workspace_it = screen.getWorkspacesList().begin(); | 131 | BScreen::Workspaces::const_iterator workspace_it = |
132 | BScreen::Workspaces::const_iterator workspace_it_end = screen.getWorkspacesList().end(); | 132 | screen.getWorkspacesList().begin(); |
133 | BScreen::Workspaces::const_iterator workspace_it_end = | ||
134 | screen.getWorkspacesList().end(); | ||
133 | for (; workspace_it != workspace_it_end; ++workspace_it) { | 135 | for (; workspace_it != workspace_it_end; ++workspace_it) { |
134 | num += (*workspace_it)->getWindowList().size(); | 136 | Workspace::Windows::iterator win_it = |
137 | (*workspace_it)->getWindowList().begin(); | ||
138 | Workspace::Windows::iterator win_it_end = | ||
139 | (*workspace_it)->getWindowList().end(); | ||
140 | for (; win_it != win_it_end; ++win_it) { | ||
141 | num += (*win_it)->numClients(); | ||
142 | } | ||
143 | |||
135 | } | 144 | } |
136 | //int num = getCurrentWorkspace()->getWindowList().size(); | 145 | //int num = getCurrentWorkspace()->getWindowList().size(); |
137 | 146 | ||
@@ -146,15 +155,19 @@ void Ewmh::updateClientList(BScreen &screen) { | |||
146 | for (; workspace_it != workspace_it_end; ++workspace_it) { | 155 | for (; workspace_it != workspace_it_end; ++workspace_it) { |
147 | 156 | ||
148 | // Fill in array of window ID's | 157 | // Fill in array of window ID's |
149 | Workspace::Windows::const_iterator it = (*workspace_it)->getWindowList().begin(); | 158 | Workspace::Windows::const_iterator it = |
150 | Workspace::Windows::const_iterator it_end = (*workspace_it)->getWindowList().end(); | 159 | (*workspace_it)->getWindowList().begin(); |
160 | Workspace::Windows::const_iterator it_end = | ||
161 | (*workspace_it)->getWindowList().end(); | ||
151 | for (; it != it_end; ++it) { | 162 | for (; it != it_end; ++it) { |
152 | if ((*it)->numClients() == 1) | 163 | if ((*it)->numClients() == 1) |
153 | wl[win++] = (*it)->getClientWindow(); | 164 | wl[win++] = (*it)->getClientWindow(); |
154 | else { | 165 | else { |
155 | // add every client in fluxboxwindow to list window list | 166 | // add every client in fluxboxwindow to list window list |
156 | std::list<WinClient *>::iterator client_it = (*it)->clientList().begin(); | 167 | std::list<WinClient *>::iterator client_it = |
157 | std::list<WinClient *>::iterator client_it_end = (*it)->clientList().end(); | 168 | (*it)->clientList().begin(); |
169 | std::list<WinClient *>::iterator client_it_end = | ||
170 | (*it)->clientList().end(); | ||
158 | for (; client_it != client_it_end; ++client_it) | 171 | for (; client_it != client_it_end; ++client_it) |
159 | wl[win++] = (*client_it)->window(); | 172 | wl[win++] = (*client_it)->window(); |
160 | } | 173 | } |
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) { | |||
125 | void Gnome::updateClientList(BScreen &screen) { | 126 | void 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 |