aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/MultLayers.cc
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-02-18 15:08:12 (GMT)
committerrathnor <rathnor>2003-02-18 15:08:12 (GMT)
commitaa602770fbbd4e84154028d3181d275b81ea914d (patch)
treea626f85fa25292ba6293bfac0f0c44117a04830c /src/FbTk/MultLayers.cc
parent9de08b90e82681d8b49b4b17251d83fd05a413cc (diff)
downloadfluxbox-aa602770fbbd4e84154028d3181d275b81ea914d.zip
fluxbox-aa602770fbbd4e84154028d3181d275b81ea914d.tar.bz2
change XLayerItem to hold FbWindows instead of X Window IDs (Window)
Diffstat (limited to 'src/FbTk/MultLayers.cc')
-rw-r--r--src/FbTk/MultLayers.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/FbTk/MultLayers.cc b/src/FbTk/MultLayers.cc
index dab1ef8..fea4dae 100644
--- a/src/FbTk/MultLayers.cc
+++ b/src/FbTk/MultLayers.cc
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: MultLayers.cc,v 1.5 2003/02/09 14:11:13 rathnor Exp $ 23// $Id: MultLayers.cc,v 1.6 2003/02/18 15:08:12 rathnor Exp $
24 24
25#include "MultLayers.hh" 25#include "MultLayers.hh"
26#include "XLayer.hh" 26#include "XLayer.hh"
@@ -151,10 +151,7 @@ void MultLayers::moveToLayer(XLayerItem &item, int layernum) {
151 151
152void MultLayers::restack() { 152void MultLayers::restack() {
153 153
154 int layernum=0, winnum=0, size=0; 154 int layernum=0, winnum=0, size = this->size();
155 for (; layernum < m_layers.size(); layernum++) {
156 size += m_layers[layernum]->countWindows();
157 }
158 155
159 Window *winlist = new Window[size]; 156 Window *winlist = new Window[size];
160 for (layernum=0; layernum < m_layers.size(); layernum++) { 157 for (layernum=0; layernum < m_layers.size(); layernum++) {
@@ -166,13 +163,14 @@ void MultLayers::restack() {
166 for (; it != it_end; ++it) { 163 for (; it != it_end; ++it) {
167 XLayerItem::Windows::const_iterator wit = (*it)->getWindows().begin(); 164 XLayerItem::Windows::const_iterator wit = (*it)->getWindows().begin();
168 XLayerItem::Windows::const_iterator wit_end = (*it)->getWindows().end(); 165 XLayerItem::Windows::const_iterator wit_end = (*it)->getWindows().end();
169 for (; wit != wit_end; ++wit, winnum++) { 166 for (; wit != wit_end; ++wit) {
170 winlist[winnum] = (*wit); 167 if ((*wit)->window())
168 winlist[winnum++] = (*wit)->window();
171 } 169 }
172 } 170 }
173 } 171 }
174 172
175 XRestackWindows(FbTk::App::instance()->display(), winlist, size); 173 XRestackWindows(FbTk::App::instance()->display(), winlist, winnum);
176 174
177 delete [] winlist; 175 delete [] winlist;
178} 176}