diff options
author | rathnor <rathnor> | 2003-02-18 15:08:12 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2003-02-18 15:08:12 (GMT) |
commit | aa602770fbbd4e84154028d3181d275b81ea914d (patch) | |
tree | a626f85fa25292ba6293bfac0f0c44117a04830c /src/FbTk/XLayerItem.cc | |
parent | 9de08b90e82681d8b49b4b17251d83fd05a413cc (diff) | |
download | fluxbox-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.cc | 16 |
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 | ||
28 | using namespace FbTk; | 28 | using namespace FbTk; |
29 | 29 | ||
30 | XLayerItem::XLayerItem(Window win, XLayer &layer) : | 30 | XLayerItem::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 | ||
79 | void XLayerItem::addWindow(Window win) { | 79 | void 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 | ||
85 | void XLayerItem::removeWindow(Window win) { | 85 | void 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 | ||
93 | void XLayerItem::bringToTop(Window win) { | 93 | void XLayerItem::bringToTop(FbWindow &win) { |
94 | removeWindow(win); | 94 | removeWindow(win); |
95 | addWindow(win); | 95 | addWindow(win); |
96 | } | 96 | } |