aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/XLayerItem.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/XLayerItem.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/XLayerItem.cc')
-rw-r--r--src/FbTk/XLayerItem.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/FbTk/XLayerItem.cc b/src/FbTk/XLayerItem.cc
index abbbd61..3a3f444 100644
--- a/src/FbTk/XLayerItem.cc
+++ b/src/FbTk/XLayerItem.cc
@@ -20,16 +20,16 @@
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: XLayerItem.cc,v 1.5 2003/02/09 14:11:14 rathnor Exp $ 23// $Id: XLayerItem.cc,v 1.6 2003/02/18 15:08:12 rathnor Exp $
24 24
25#include "XLayerItem.hh" 25#include "XLayerItem.hh"
26#include "XLayer.hh" 26#include "XLayer.hh"
27 27
28using namespace FbTk; 28using namespace FbTk;
29 29
30XLayerItem::XLayerItem(Window win, XLayer &layer) : 30XLayerItem::XLayerItem(FbWindow &win, XLayer &layer) :
31 m_layer(&layer), m_layeriterator(0) { 31 m_layer(&layer), m_layeriterator(0) {
32 m_windows.push_front(win); 32 m_windows.push_front(&win);
33 m_layer->insert(*this); 33 m_layer->insert(*this);
34} 34}
35 35
@@ -76,21 +76,21 @@ void XLayerItem::moveToLayer(int layernum) {
76 m_layer->moveToLayer(*this, layernum); 76 m_layer->moveToLayer(*this, layernum);
77} 77}
78 78
79void XLayerItem::addWindow(Window win) { 79void XLayerItem::addWindow(FbWindow &win) {
80 // I'd like to think we can trust ourselves that it won't be added twice... 80 // I'd like to think we can trust ourselves that it won't be added twice...
81 // Otherwise we're always scanning through the list. 81 // Otherwise we're always scanning through the list.
82 m_windows.push_back(win); 82 m_windows.push_back(&win);
83} 83}
84 84
85void XLayerItem::removeWindow(Window win) { 85void XLayerItem::removeWindow(FbWindow &win) {
86 // I'd like to think we can trust ourselves that it won't be added twice... 86 // I'd like to think we can trust ourselves that it won't be added twice...
87 // Otherwise we're always scanning through the list. 87 // Otherwise we're always scanning through the list.
88 88
89 XLayerItem::Windows::iterator it = std::find(m_windows.begin(), m_windows.end(), win); 89 XLayerItem::Windows::iterator it = std::find(m_windows.begin(), m_windows.end(), &win);
90 m_windows.erase(it); 90 m_windows.erase(it);
91} 91}
92 92
93void XLayerItem::bringToTop(Window win) { 93void XLayerItem::bringToTop(FbWindow &win) {
94 removeWindow(win); 94 removeWindow(win);
95 addWindow(win); 95 addWindow(win);
96} 96}