From 538e33fedb8ea0730b17c6f92e9f3e4705343ca6 Mon Sep 17 00:00:00 2001 From: markt Date: Sun, 5 Aug 2007 22:28:11 +0000 Subject: some minor changes --- ChangeLog | 2 +- src/Ewmh.cc | 2 +- src/FbTk/XLayer.cc | 2 -- src/Window.cc | 27 +++++++++++++++------------ 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index d759366..f5b58c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,7 +24,7 @@ Changes for 1.0.0: sf.net #1524098, #1633718 (and older?) src/SystemTray.hh/cc src/FbTk/FbWindow.hh/cc *07/07/31: - * Change _NET_WM_WINDOW_TYPE_MENU to use TINY decoration type (Mark) + * Change _NET_WM_WINDOW_TYPE_MENU to use TOOL decoration type (Mark) Ewmh.cc *07/07/24: * Don't allow ToggleDecor with fullscreen windows, and make it show diff --git a/src/Ewmh.cc b/src/Ewmh.cc index fef4428..0c5e164 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc @@ -318,7 +318,7 @@ void Ewmh::setupFrame(FluxboxWindow &win) { * application). Windows of this type may set the * WM_TRANSIENT_FOR hint indicating the main application window. */ - win.setDecoration(FluxboxWindow::DECOR_TINY); + win.setDecoration(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 a6f3194..653032e 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -138,18 +138,18 @@ 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.screen().updateNetizenWindowRaise(win.clientWindow()); - win.layerItem().raise(); - } + win.screen().updateNetizenWindowRaise(win.clientWindow()); + win.layerItem().raise(); // for each transient do raise @@ -174,6 +174,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 @@ -181,18 +184,18 @@ void lowerFluxboxWindow(FluxboxWindow &win) { if (!win.winClient().transientList().empty()) win.screen().layerManager().lock(); - if (!win.isIconic()) { - win.screen().updateNetizenWindowLower(win.clientWindow()); - 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.screen().updateNetizenWindowLower(win.clientWindow()); + win.layerItem().lower(); + win.oplock = false; if (!win.winClient().transientList().empty()) win.screen().layerManager().unlock(); -- cgit v0.11.2