From 68627c24084b1fb84ad33f7a864348c80ea887bf Mon Sep 17 00:00:00 2001 From: fluxgen Date: Wed, 21 Jan 2004 15:42:14 +0000 Subject: minor fixes --- src/Ewmh.cc | 96 +++++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 61 insertions(+), 35 deletions(-) diff --git a/src/Ewmh.cc b/src/Ewmh.cc index 190850b..f09b365 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Ewmh.cc,v 1.40 2004/01/21 09:37:10 fluxgen Exp $ +// $Id: Ewmh.cc,v 1.41 2004/01/21 15:42:14 fluxgen Exp $ #include "Ewmh.hh" @@ -144,31 +144,6 @@ void Ewmh::setupFrame(FluxboxWindow &win) { unsigned long nitems, bytes_after; unsigned char *data = 0; - win.winClient().property(m_net_wm_state, 0, 0x7fffffff, False, XA_ATOM, - &ret_type, &fmt, &nitems, &bytes_after, - &data); - if (data) { - // we must convert to long - unsigned long *real = (unsigned long *)data; - for (unsigned long i=0; i(*data); - if (desktop == 0xFFFFFFFF && !win.isStuck()) - win.stick(); - else - win.screen().sendToWorkspace(desktop, &win, false); - - XFree(data); - } - - updateWorkspace(win); - /* From Extended Window Manager Hints, draft 1.3: * * _NET_WM_WINDOW_TYPE, ATOM[]/32 @@ -199,6 +174,7 @@ void Ewmh::setupFrame(FluxboxWindow &win) { */ if (atoms[l] == m_net_wm_window_type_dock) { win.moveToLayer(Fluxbox::instance()->getDockLayer()); + cerr<<"Dock app: moveToLayer Dock layer"<(*data); + if (desktop == 0xFFFFFFFF && !win.isStuck()) + win.stick(); + else + win.screen().sendToWorkspace(desktop, &win, false); + + XFree(data); + } + + updateWorkspace(win); + + } void Ewmh::updateFrameClose(FluxboxWindow &win) { @@ -730,14 +724,12 @@ void Ewmh::setState(FluxboxWindow &win, Atom state, bool value) { 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 @@ -766,11 +758,12 @@ void Ewmh::toggleState(FluxboxWindow &win, Atom state) { 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()); + win.moveToLayer(Fluxbox::instance()->getAboveDockLayer()); } } @@ -784,16 +777,49 @@ void Ewmh::updateStrut(WinClient &winclient) { if (winclient.property(m_net_wm_strut, 0, 4, False, XA_CARDINAL, &ret_type, &fmt, &nitems, &bytes_after, (unsigned char **) &data) && data) { -#ifdef DEBUG - cerr<<__FILE__<<"("<<__FUNCTION__<<"): Strut: "<