aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-04-15 23:09:26 (GMT)
committerrathnor <rathnor>2003-04-15 23:09:26 (GMT)
commit909b3c5665213ef2a05ef26e33506d02829bdd93 (patch)
tree293a3a87f5ed1524c98d6011daa76743b953373e /src/FbTk
parent4ca88642fad0b89209aea9272b835b1e724975ad (diff)
downloadfluxbox_pavel-909b3c5665213ef2a05ef26e33506d02829bdd93.zip
fluxbox_pavel-909b3c5665213ef2a05ef26e33506d02829bdd93.tar.bz2
raise on focus [at end of cycle], also a temporary raise while cycling
(Simon)
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/XLayer.cc23
-rw-r--r--src/FbTk/XLayer.hh5
-rw-r--r--src/FbTk/XLayerItem.cc6
-rw-r--r--src/FbTk/XLayerItem.hh4
4 files changed, 34 insertions, 4 deletions
diff --git a/src/FbTk/XLayer.cc b/src/FbTk/XLayer.cc
index 43bd76c..ad1e49d 100644
--- a/src/FbTk/XLayer.cc
+++ b/src/FbTk/XLayer.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: XLayer.cc,v 1.6 2003/02/18 15:08:12 rathnor Exp $ 23// $Id: XLayer.cc,v 1.7 2003/04/15 23:09:24 rathnor Exp $
24 24
25#include "XLayer.hh" 25#include "XLayer.hh"
26#include "XLayerItem.hh" 26#include "XLayerItem.hh"
@@ -264,6 +264,27 @@ void XLayer::raise(XLayerItem &item) {
264 264
265} 265}
266 266
267void XLayer::tempRaise(XLayerItem &item) {
268 // assume it is already in this layer
269
270 if (&item == itemList().front())
271 return; // nothing to do
272
273 iterator it = std::find(itemList().begin(), itemList().end(), &item);
274 if (it != itemList().end())
275 // don't remove it
276#ifdef DEBUG
277 else {
278 cerr<<__FILE__<<"("<<__LINE__<<"): WARNING: raise on item not in layer["<<m_layernum<<"]"<<endl;
279 return;
280 }
281#endif // DEBUG
282
283 // don't add it back to the top
284 stackBelowItem(&item, m_manager.getLowestItemAboveLayer(m_layernum));
285
286}
287
267void XLayer::lower(XLayerItem &item) { 288void XLayer::lower(XLayerItem &item) {
268 // assume already in this layer 289 // assume already in this layer
269 290
diff --git a/src/FbTk/XLayer.hh b/src/FbTk/XLayer.hh
index 88ba4ef..82bee5e 100644
--- a/src/FbTk/XLayer.hh
+++ b/src/FbTk/XLayer.hh
@@ -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: XLayer.hh,v 1.3 2003/02/09 14:11:14 rathnor Exp $ 23// $Id: XLayer.hh,v 1.4 2003/04/15 23:09:25 rathnor Exp $
24 24
25 25
26#ifndef FBTK_XLAYER_HH 26#ifndef FBTK_XLAYER_HH
@@ -72,6 +72,9 @@ public:
72 void raise(XLayerItem &item); 72 void raise(XLayerItem &item);
73 void lower(XLayerItem &item); 73 void lower(XLayerItem &item);
74 74
75 // raise it, but don't make it permanent (i.e. restack will revert)
76 void tempRaise(XLayerItem &item);
77
75 // send to next layer up 78 // send to next layer up
76 void raiseLayer(XLayerItem &item); 79 void raiseLayer(XLayerItem &item);
77 void lowerLayer(XLayerItem &item); 80 void lowerLayer(XLayerItem &item);
diff --git a/src/FbTk/XLayerItem.cc b/src/FbTk/XLayerItem.cc
index 3a3f444..fdc7fb6 100644
--- a/src/FbTk/XLayerItem.cc
+++ b/src/FbTk/XLayerItem.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: XLayerItem.cc,v 1.6 2003/02/18 15:08:12 rathnor Exp $ 23// $Id: XLayerItem.cc,v 1.7 2003/04/15 23:09:25 rathnor Exp $
24 24
25#include "XLayerItem.hh" 25#include "XLayerItem.hh"
26#include "XLayer.hh" 26#include "XLayer.hh"
@@ -56,6 +56,10 @@ void XLayerItem::lower() {
56 m_layer->lower(*this); 56 m_layer->lower(*this);
57} 57}
58 58
59void XLayerItem::tempRaise() {
60 m_layer->tempRaise(*this);
61}
62
59void XLayerItem::stepUp() { 63void XLayerItem::stepUp() {
60 m_layer->stepUp(*this); 64 m_layer->stepUp(*this);
61} 65}
diff --git a/src/FbTk/XLayerItem.hh b/src/FbTk/XLayerItem.hh
index 1998382..bf53aa6 100644
--- a/src/FbTk/XLayerItem.hh
+++ b/src/FbTk/XLayerItem.hh
@@ -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: XLayerItem.hh,v 1.6 2003/02/18 15:08:12 rathnor Exp $ 23// $Id: XLayerItem.hh,v 1.7 2003/04/15 23:09:26 rathnor Exp $
24 24
25#ifndef FBTK_XLAYERITEM_HH 25#ifndef FBTK_XLAYERITEM_HH
26#define FBTK_XLAYERITEM_HH 26#define FBTK_XLAYERITEM_HH
@@ -46,6 +46,8 @@ public:
46 46
47 void raise(); 47 void raise();
48 void lower(); 48 void lower();
49 void tempRaise(); // this raise gets reverted by a restack()
50
49 // go above the next item visible in this layer 51 // go above the next item visible in this layer
50 void stepUp(); 52 void stepUp();
51 void stepDown(); 53 void stepDown();