aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/XLayerItem.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2011-02-23 21:46:13 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2011-02-23 21:46:13 (GMT)
commit813e6c4402b7d13a9e7b1ce3e391bc4c8d894ea3 (patch)
treeb921da6cf7680d0bcded98caf319de6d058dca13 /src/FbTk/XLayerItem.cc
parentc859ae3987d0b49609effb98e8c28562e1947cf1 (diff)
downloadfluxbox-813e6c4402b7d13a9e7b1ce3e391bc4c8d894ea3.zip
fluxbox-813e6c4402b7d13a9e7b1ce3e391bc4c8d894ea3.tar.bz2
disabled overhead base classes 'FbTk::Layer' and 'FbTk::LayerItem'
had to add <algorithm> at various other files as a result of this change.
Diffstat (limited to 'src/FbTk/XLayerItem.cc')
-rw-r--r--src/FbTk/XLayerItem.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/FbTk/XLayerItem.cc b/src/FbTk/XLayerItem.cc
index d822590..7f6f594 100644
--- a/src/FbTk/XLayerItem.cc
+++ b/src/FbTk/XLayerItem.cc
@@ -23,11 +23,13 @@
23#include "XLayerItem.hh" 23#include "XLayerItem.hh"
24#include "XLayer.hh" 24#include "XLayer.hh"
25 25
26#include <algorithm>
27
26using namespace FbTk; 28using namespace FbTk;
27 29
28XLayerItem::XLayerItem(FbWindow &win, XLayer &layer) : 30XLayerItem::XLayerItem(FbWindow &win, XLayer &layer) :
29 m_layer(&layer) { 31 m_layer(&layer) {
30 m_windows.push_front(&win); 32 m_windows.push_back(&win);
31 m_layer->insert(*this); 33 m_layer->insert(*this);
32} 34}
33 35
@@ -78,15 +80,15 @@ void XLayerItem::addWindow(FbWindow &win) {
78} 80}
79 81
80void XLayerItem::removeWindow(FbWindow &win) { 82void XLayerItem::removeWindow(FbWindow &win) {
81 // I'd like to think we can trust ourselves that it won't be added twice... 83 // I'd like to think we can trust ourselves that it won't be added twice...
82 // Otherwise we're always scanning through the list. 84 // Otherwise we're always scanning through the list.
83 85
84 XLayerItem::Windows::iterator it = std::find(m_windows.begin(), m_windows.end(), &win); 86 XLayerItem::Windows::iterator it = std::find(m_windows.begin(), m_windows.end(), &win);
85 if (it != m_windows.end()) 87 if (it != m_windows.end())
86 m_windows.erase(it); 88 m_windows.erase(it);
87} 89}
88 90
89void XLayerItem::bringToTop(FbWindow &win) { 91void XLayerItem::bringToTop(FbWindow &win) {
90 removeWindow(win); 92 removeWindow(win);
91 addWindow(win); 93 addWindow(win);
92} 94}