all repos — fluxbox @ b70408815c5cbb84f342c48127013d8ee8dcdc7f

custom fork of the fluxbox windowmanager

support for _NET_WM_STATE_ABOVE and _NET_WM_STATE_BELOW
fluxgen fluxgen
commit

b70408815c5cbb84f342c48127013d8ee8dcdc7f

parent

b3a2564ffd946adcc5f5baabef36ba0c5fd99ea9

1 files changed, 31 insertions(+), 2 deletions(-)

jump to
M src/Ewmh.ccsrc/Ewmh.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Ewmh.cc,v 1.38 2004/01/19 18:21:51 fluxgen Exp $ +// $Id: Ewmh.cc,v 1.39 2004/01/19 22:43:08 fluxgen Exp $ #include "Ewmh.hh"

@@ -610,6 +610,9 @@ m_net_wm_state_maximized_vert = XInternAtom(disp, "_NET_WM_STATE_MAXIMIZED_VERT", False);

m_net_wm_state_fullscreen = XInternAtom(disp, "_NET_WM_STATE_FULLSCREEN", False); m_net_wm_state_hidden = XInternAtom(disp, "_NET_WM_STATE_HIDDEN", False); m_net_wm_state_skip_taskbar = XInternAtom(disp, "_NET_WM_STATE_SKIP_TASKBAR", False); + m_net_wm_state_above = XInternAtom(disp, "_NET_WM_STATE_ABOVE", False); + m_net_wm_state_below = XInternAtom(disp, "_NET_WM_STATE_BELOW", False); + m_net_wm_strut = XInternAtom(disp, "_NET_WM_STRUT", False); m_net_wm_icon_geometry = XInternAtom(disp, "_NET_WM_ICON_GEOMETRY", False);

@@ -678,8 +681,23 @@ win.maximizeVertical();

} else if (state == m_net_wm_state_fullscreen) { // fullscreen setFullscreen(win, value); } else if (state == m_net_wm_state_hidden || - state == m_net_wm_state_skip_taskbar) + state == m_net_wm_state_skip_taskbar) { win.setHidden(value); + } else if (state == m_net_wm_state_below) { + + if (value) + win.moveToLayer(Fluxbox::instance()->getBottomLayer()); + else + win.moveToLayer(Fluxbox::instance()->getNormalLayer()); + + } else if (state == m_net_wm_state_above) { + + if (value) + win.moveToLayer(Fluxbox::instance()->getAboveDockLayer()); + else + win.moveToLayer(Fluxbox::instance()->getNormalLayer()); + + } } // toggle window state

@@ -697,7 +715,18 @@ setFullscreen(win, getState(win) == 0); // toggle current state

} else if (state == m_net_wm_state_hidden || state == m_net_wm_state_skip_taskbar) { win.setHidden(!win.isHidden()); + } else if (state == m_net_wm_state_below) { + if (win.layerNum() == Fluxbox::instance()->getBottomLayer()) + win.moveToLayer(Fluxbox::instance()->getNormalLayer()); + else + win.moveToLayer(Fluxbox::instance()->getBottomLayer()); + } else if (state == m_net_wm_state_above) { + if (win.layerNum() == Fluxbox::instance()->getAboveDockLayer()) + win.moveToLayer(Fluxbox::instance()->getNormalLayer()); + else + win.moveToLayer(Fluxbox::instance()->getNormalLayer()); } + }