From 7ca95258d0fad6402539ba7966c8503bab406c73 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Wed, 11 Aug 2004 13:16:10 +0000 Subject: debug messages and some minor cleaning --- src/Gnome.cc | 47 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/src/Gnome.cc b/src/Gnome.cc index 18bd491..64a6cac 100644 --- a/src/Gnome.cc +++ b/src/Gnome.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Gnome.cc,v 1.36 2004/06/28 13:33:05 fluxgen Exp $ +// $Id: Gnome.cc,v 1.37 2004/08/11 13:16:10 fluxgen Exp $ #include "Gnome.hh" @@ -88,7 +88,6 @@ void Gnome::initForScreen(BScreen &screen) { void Gnome::setupFrame(FluxboxWindow &win) { // load gnome state (take queues from the main window of the frame) - Display *disp = FbTk::App::instance()->display(); Atom ret_type; int fmt; unsigned long nitems, bytes_after; @@ -105,10 +104,9 @@ void Gnome::setupFrame(FluxboxWindow &win) { } // load gnome layer atom - if (XGetWindowProperty(disp, win.clientWindow(), - m_gnome_wm_win_layer, 0, 1, False, XA_CARDINAL, - &ret_type, &fmt, &nitems, &bytes_after, - (unsigned char **) &data) == Success && data) { + if (win.winClient().property(m_gnome_wm_win_layer, 0, 1, False, XA_CARDINAL, + &ret_type, &fmt, &nitems, &bytes_after, + (unsigned char **) &data) && data) { flags = *data; setLayer(&win, flags); XFree (data); @@ -117,10 +115,9 @@ void Gnome::setupFrame(FluxboxWindow &win) { } // load gnome workspace atom - if (XGetWindowProperty(disp, win.clientWindow(), - m_gnome_wm_win_workspace, 0, 1, False, XA_CARDINAL, - &ret_type, &fmt, &nitems, &bytes_after, - (unsigned char **) &data) == Success && data) { + if (win.winClient().property(m_gnome_wm_win_workspace, 0, 1, False, XA_CARDINAL, + &ret_type, &fmt, &nitems, &bytes_after, + (unsigned char **) &data) && data) { unsigned int workspace_num = *data; if (win.workspaceNumber() != workspace_num) win.screen().reassociateWindow(&win, workspace_num, false); @@ -138,6 +135,11 @@ bool Gnome::propertyNotify(WinClient &winclient, Atom the_property) { cerr<<__FILE__<<"("<<__FUNCTION__<<"): _WIN_STATE"<title()<<", WIN_LAYER_DESKTOP)"<getDesktopLayer(); break; case WIN_LAYER_BELOW: +#ifdef DEBUG + cerr<<"Gnome::setLayer("<title()<<", WIN_LAYER_BELOW)"<getBottomLayer(); break; case WIN_LAYER_NORMAL: +#ifdef DEBUG + cerr<<"Gnome::setLayer("<title()<<", WIN_LAYER_NORMAL)"<getNormalLayer(); break; case WIN_LAYER_ONTOP: +#ifdef DEBUG + cerr<<"Gnome::setLayer("<title()<<", WIN_LAYER_ONTOP)"<getTopLayer(); break; case WIN_LAYER_DOCK: +#ifdef DEBUG + cerr<<"Gnome::setLayer("<title()<<", WIN_LAYER_DOCK)"<getDockLayer(); break; case WIN_LAYER_ABOVE_DOCK: +#ifdef DEBUG + cerr<<"Gnome::setLayer("<title()<<", WIN_LAYER_ABOVE_DOCK)"<getAboveDockLayer(); break; case WIN_LAYER_MENU: +#ifdef DEBUG + cerr<<"Gnome::setLayer("<title()<<", WIN_LAYER_MENU)"<getMenuLayer(); break; default: // our windows are in the opposite direction to gnome layer = Fluxbox::instance()->getDesktopLayer() - layer; +#ifdef DEBUG + cerr<<"Gnome::setLayer("<title()<<", "<moveToLayer(layer); } -- cgit v0.11.2