aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
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/Window.cc
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/Window.cc')
-rw-r--r--src/Window.cc38
1 files changed, 37 insertions, 1 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 69877e2..35f5be9 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Window.cc,v 1.137 2003/04/15 21:38:23 fluxgen Exp $ 25// $Id: Window.cc,v 1.138 2003/04/15 23:09:13 rathnor Exp $
26 26
27#include "Window.hh" 27#include "Window.hh"
28 28
@@ -153,6 +153,23 @@ void lowerFluxboxWindow(FluxboxWindow &win) {
153 } 153 }
154} 154}
155 155
156/// raise window and do the same for each transient it holds
157void tempRaiseFluxboxWindow(FluxboxWindow &win) {
158
159 if (!win.isIconic()) {
160 // don't update netizen, as it is only temporary
161 win.getLayerItem().tempRaise();
162 }
163
164 // for each transient do raise
165 std::list<FluxboxWindow *>::const_iterator it = win.getTransients().begin();
166 std::list<FluxboxWindow *>::const_iterator it_end = win.getTransients().end();
167 for (; it != it_end; ++it) {
168 if (!(*it)->isIconic())
169 tempRaiseFluxboxWindow(*(*it));
170 }
171}
172
156class SetClientCmd:public FbTk::Command { 173class SetClientCmd:public FbTk::Command {
157public: 174public:
158 explicit SetClientCmd(WinClient &client):m_client(client) { 175 explicit SetClientCmd(WinClient &client):m_client(client) {
@@ -1410,6 +1427,25 @@ void FluxboxWindow::lower() {
1410 lowerFluxboxWindow(*bottom); 1427 lowerFluxboxWindow(*bottom);
1411} 1428}
1412 1429
1430void FluxboxWindow::tempRaise() {
1431 if (isIconic())
1432 deiconify();
1433
1434 // get root window
1435 FluxboxWindow *win = this;
1436 while (win->getTransientFor()) {
1437 win = win->getTransientFor();
1438 assert(win != win->getTransientFor());
1439 }
1440 // if we don't have any root window use this as root
1441 if (win == 0)
1442 win = this;
1443
1444 // raise this window and every transient in it
1445 tempRaiseFluxboxWindow(*win);
1446}
1447
1448
1413void FluxboxWindow::raiseLayer() { 1449void FluxboxWindow::raiseLayer() {
1414 // don't let it up to menu layer 1450 // don't let it up to menu layer
1415 if (getLayerNum() == (Fluxbox::instance()->getMenuLayer()+1)) 1451 if (getLayerNum() == (Fluxbox::instance()->getMenuLayer()+1))