aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-01-19 22:43:08 (GMT)
committerfluxgen <fluxgen>2004-01-19 22:43:08 (GMT)
commitb70408815c5cbb84f342c48127013d8ee8dcdc7f (patch)
tree10b471f1f15921e7223869c82492bdc06c7745b6 /src
parentb3a2564ffd946adcc5f5baabef36ba0c5fd99ea9 (diff)
downloadfluxbox-b70408815c5cbb84f342c48127013d8ee8dcdc7f.zip
fluxbox-b70408815c5cbb84f342c48127013d8ee8dcdc7f.tar.bz2
support for _NET_WM_STATE_ABOVE and _NET_WM_STATE_BELOW
Diffstat (limited to 'src')
-rw-r--r--src/Ewmh.cc33
1 files changed, 31 insertions, 2 deletions
diff --git a/src/Ewmh.cc b/src/Ewmh.cc
index 67a3520..56d524e 100644
--- a/src/Ewmh.cc
+++ b/src/Ewmh.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Ewmh.cc,v 1.38 2004/01/19 18:21:51 fluxgen Exp $ 22// $Id: Ewmh.cc,v 1.39 2004/01/19 22:43:08 fluxgen Exp $
23 23
24#include "Ewmh.hh" 24#include "Ewmh.hh"
25 25
@@ -610,6 +610,9 @@ void Ewmh::createAtoms() {
610 m_net_wm_state_fullscreen = XInternAtom(disp, "_NET_WM_STATE_FULLSCREEN", False); 610 m_net_wm_state_fullscreen = XInternAtom(disp, "_NET_WM_STATE_FULLSCREEN", False);
611 m_net_wm_state_hidden = XInternAtom(disp, "_NET_WM_STATE_HIDDEN", False); 611 m_net_wm_state_hidden = XInternAtom(disp, "_NET_WM_STATE_HIDDEN", False);
612 m_net_wm_state_skip_taskbar = XInternAtom(disp, "_NET_WM_STATE_SKIP_TASKBAR", False); 612 m_net_wm_state_skip_taskbar = XInternAtom(disp, "_NET_WM_STATE_SKIP_TASKBAR", False);
613 m_net_wm_state_above = XInternAtom(disp, "_NET_WM_STATE_ABOVE", False);
614 m_net_wm_state_below = XInternAtom(disp, "_NET_WM_STATE_BELOW", False);
615
613 616
614 m_net_wm_strut = XInternAtom(disp, "_NET_WM_STRUT", False); 617 m_net_wm_strut = XInternAtom(disp, "_NET_WM_STRUT", False);
615 m_net_wm_icon_geometry = XInternAtom(disp, "_NET_WM_ICON_GEOMETRY", False); 618 m_net_wm_icon_geometry = XInternAtom(disp, "_NET_WM_ICON_GEOMETRY", False);
@@ -678,8 +681,23 @@ void Ewmh::setState(FluxboxWindow &win, Atom state, bool value) {
678 } else if (state == m_net_wm_state_fullscreen) { // fullscreen 681 } else if (state == m_net_wm_state_fullscreen) { // fullscreen
679 setFullscreen(win, value); 682 setFullscreen(win, value);
680 } else if (state == m_net_wm_state_hidden || 683 } else if (state == m_net_wm_state_hidden ||
681 state == m_net_wm_state_skip_taskbar) 684 state == m_net_wm_state_skip_taskbar) {
682 win.setHidden(value); 685 win.setHidden(value);
686 } else if (state == m_net_wm_state_below) {
687
688 if (value)
689 win.moveToLayer(Fluxbox::instance()->getBottomLayer());
690 else
691 win.moveToLayer(Fluxbox::instance()->getNormalLayer());
692
693 } else if (state == m_net_wm_state_above) {
694
695 if (value)
696 win.moveToLayer(Fluxbox::instance()->getAboveDockLayer());
697 else
698 win.moveToLayer(Fluxbox::instance()->getNormalLayer());
699
700 }
683} 701}
684 702
685// toggle window state 703// toggle window state
@@ -697,7 +715,18 @@ void Ewmh::toggleState(FluxboxWindow &win, Atom state) {
697 } else if (state == m_net_wm_state_hidden || 715 } else if (state == m_net_wm_state_hidden ||
698 state == m_net_wm_state_skip_taskbar) { 716 state == m_net_wm_state_skip_taskbar) {
699 win.setHidden(!win.isHidden()); 717 win.setHidden(!win.isHidden());
718 } else if (state == m_net_wm_state_below) {
719 if (win.layerNum() == Fluxbox::instance()->getBottomLayer())
720 win.moveToLayer(Fluxbox::instance()->getNormalLayer());
721 else
722 win.moveToLayer(Fluxbox::instance()->getBottomLayer());
723 } else if (state == m_net_wm_state_above) {
724 if (win.layerNum() == Fluxbox::instance()->getAboveDockLayer())
725 win.moveToLayer(Fluxbox::instance()->getNormalLayer());
726 else
727 win.moveToLayer(Fluxbox::instance()->getNormalLayer());
700 } 728 }
729
701} 730}
702 731
703 732