From ed2c1b0d147b3462bf3eaf33a27783352c156cb3 Mon Sep 17 00:00:00 2001 From: markt Date: Sun, 5 Aug 2007 22:12:05 +0000 Subject: some minor fixes --- src/Ewmh.cc | 2 +- src/FbTk/XLayer.cc | 2 -- src/Window.cc | 23 +++++++++++++---------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/Ewmh.cc b/src/Ewmh.cc index 7e5a50c..c3a8827 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc @@ -305,7 +305,7 @@ void Ewmh::setupFrame(FluxboxWindow &win) { * application). Windows of this type may set the * WM_TRANSIENT_FOR hint indicating the main application window. */ - win.setDecorationMask(FluxboxWindow::DECOR_TINY); + win.setDecorationMask(FluxboxWindow::DECOR_TOOL); win.setIconHidden(true); win.moveToLayer(Layer::ABOVE_DOCK); } else if (atoms[l] == m_net_wm_window_type_toolbar) { diff --git a/src/FbTk/XLayer.cc b/src/FbTk/XLayer.cc index 8e1dfc1..6c44ad9 100644 --- a/src/FbTk/XLayer.cc +++ b/src/FbTk/XLayer.cc @@ -53,8 +53,6 @@ void XLayer::restack() { // each LayerItem can contain several windows iterator it = itemList().begin(); iterator it_end = itemList().end(); - it = itemList().begin(); - it_end = itemList().end(); Window *winlist = new Window[num_windows]; size_t j=0; diff --git a/src/Window.cc b/src/Window.cc index 4c701a4..cf20503 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -138,17 +138,17 @@ void raiseFluxboxWindow(FluxboxWindow &win) { if (win.oplock) return; - win.oplock = true; + if (win.isIconic()) + return; + win.oplock = true; // we need to lock actual restacking so that raising above active transient // won't do anything nasty if (!win.winClient().transientList().empty()) win.screen().layerManager().lock(); - if (!win.isIconic()) { - win.layerItem().raise(); - } + win.layerItem().raise(); // for each transient do raise @@ -173,6 +173,9 @@ void lowerFluxboxWindow(FluxboxWindow &win) { if (win.oplock) return; + if (win.isIconic()) + return; + win.oplock = true; // we need to lock actual restacking so that raising above active transient @@ -180,17 +183,17 @@ void lowerFluxboxWindow(FluxboxWindow &win) { if (!win.winClient().transientList().empty()) win.screen().layerManager().lock(); - if (!win.isIconic()) { - win.layerItem().lower(); - } - - WinClient::TransientList::const_iterator it = win.winClient().transientList().begin(); - WinClient::TransientList::const_iterator it_end = win.winClient().transientList().end(); + // lower the windows from the top down, so they don't change stacking order + WinClient::TransientList::const_reverse_iterator it = win.winClient().transientList().rbegin(); + WinClient::TransientList::const_reverse_iterator it_end = win.winClient().transientList().rend(); for (; it != it_end; ++it) { if ((*it)->fbwindow() && !(*it)->fbwindow()->isIconic()) // TODO: should we also check if it is the active client? lowerFluxboxWindow(*(*it)->fbwindow()); } + + win.layerItem().lower(); + win.oplock = false; if (!win.winClient().transientList().empty()) win.screen().layerManager().unlock(); -- cgit v0.11.2