From ddce8511658c7bb0a91962e5c22d2641eb760899 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Tue, 26 Feb 2002 22:35:58 +0000 Subject: added gnome layer stuff --- src/Window.cc | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---- src/Window.hh | 9 +++++++-- 2 files changed, 67 insertions(+), 6 deletions(-) diff --git a/src/Window.cc b/src/Window.cc index aee5504..ee149a2 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.cc,v 1.29 2002/02/17 18:48:22 fluxgen Exp $ +// $Id: Window.cc,v 1.30 2002/02/26 22:35:58 fluxgen Exp $ //use GNU extensions #ifndef _GNU_SOURCE @@ -73,6 +73,7 @@ timer(0), display(0), lastButtonPressTime(0), windowmenu(0), +m_layer(LAYER_NORMAL), tab(0) #ifdef GNOME ,gnome_hints(0) @@ -921,7 +922,19 @@ int FluxboxWindow::getGnomeWindowState() { //TODO int FluxboxWindow::getGnomeLayer() { - return WIN_LAYER_NORMAL; + switch (m_layer) { + case LAYER_NORMAL: + return WIN_LAYER_NORMAL; + case LAYER_BOTTOM: + return WIN_LAYER_BELOW; + case LAYER_TOP: + return WIN_LAYER_ONTOP; + case LAYER_BELOW: + return WIN_LAYER_BELOW; + default: + break; + } + return WIN_LAYER_NORMAL; } bool FluxboxWindow::handleGnomePropertyNotify(Atom atom) { @@ -945,7 +958,7 @@ bool FluxboxWindow::handleGnomePropertyNotify(Atom atom) { #ifdef DEBUG cerr<<__FILE__<<"("<<__LINE__<<"): gnome layer"<getBaseDisplay(); + if (XGetWindowProperty (bd->getXDisplay(), getClientWindow(), + bd->getGnomeLayerAtom(), 0, 1, False, XA_CARDINAL, + &ret_type, &fmt, &nitems, &bytes_after, + (unsigned char **) &data) == Success && data) { + setGnomeLayer(static_cast(*data)); + #ifdef DEBUG + cerr<<__FILE__<<"("<<__LINE__<<"): gnome hints:0x"<