From a10c34918c4b439b803f67304215b22d7ca649dd Mon Sep 17 00:00:00 2001 From: fluxgen Date: Tue, 7 May 2002 13:31:11 +0000 Subject: const on updateGnome* functions --- src/Window.cc | 21 ++++++++++----------- src/Window.hh | 16 ++++++++-------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/Window.cc b/src/Window.cc index 9b4f555..2fcc31b 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.48 2002/04/28 20:09:31 fluxgen Exp $ +// $Id: Window.cc,v 1.49 2002/05/07 13:31:11 fluxgen Exp $ #include "Window.hh" @@ -862,36 +862,35 @@ void FluxboxWindow::createButton(int type, ButtonEventProc pressed, ButtonEventP #ifdef GNOME //TODO -void FluxboxWindow::updateGnomeAtoms() { - updateGnomeWorkspaceAtom(); +void FluxboxWindow::updateGnomeAtoms() const { updateGnomeStateAtom(); updateGnomeLayerAtom(); updateGnomeWorkspaceAtom(); } -void FluxboxWindow::updateGnomeStateAtom() { - BaseDisplay *bd = screen->getBaseDisplay(); +void FluxboxWindow::updateGnomeStateAtom() const { + const BaseDisplay *bd = screen->getBaseDisplay(); int val = getGnomeWindowState(); XChangeProperty(display, client.window, bd->getGnomeStateAtom(), XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&val, 1); } -void FluxboxWindow::updateGnomeLayerAtom() { - BaseDisplay *bd = screen->getBaseDisplay(); +void FluxboxWindow::updateGnomeLayerAtom() const { + const BaseDisplay *bd = screen->getBaseDisplay(); int val = getGnomeLayer(); XChangeProperty(display, client.window, bd->getGnomeLayerAtom(), XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&val, 1); } -void FluxboxWindow::updateGnomeWorkspaceAtom() { - BaseDisplay *bd = screen->getBaseDisplay(); +void FluxboxWindow::updateGnomeWorkspaceAtom() const { + const BaseDisplay *bd = screen->getBaseDisplay(); int val = workspace_number; XChangeProperty(display, client.window, bd->getGnomeWorkspaceAtom(), XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&val, 1); } //TODO -int FluxboxWindow::getGnomeWindowState() { +int FluxboxWindow::getGnomeWindowState() const { int state=0; if (isStuck()) state |= WIN_STATE_STICKY; @@ -912,7 +911,7 @@ int FluxboxWindow::getGnomeWindowState() { } //TODO -int FluxboxWindow::getGnomeLayer() { +int FluxboxWindow::getGnomeLayer() const { switch (m_layer) { case LAYER_NORMAL: return WIN_LAYER_NORMAL; diff --git a/src/Window.hh b/src/Window.hh index 0dc1e91..ae2d739 100644 --- a/src/Window.hh +++ b/src/Window.hh @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.hh,v 1.18 2002/04/04 22:39:52 fluxgen Exp $ +// $Id: Window.hh,v 1.19 2002/05/07 13:31:11 fluxgen Exp $ #ifndef WINDOW_HH #define WINDOW_HH @@ -321,17 +321,17 @@ private: #ifdef GNOME - void updateGnomeAtoms(); - void updateGnomeStateAtom(); - void updateGnomeHintsAtom(); - void updateGnomeLayerAtom(); - void updateGnomeWorkspaceAtom(); + void updateGnomeAtoms() const; + void updateGnomeStateAtom() const; + void updateGnomeHintsAtom() const; + void updateGnomeLayerAtom() const; + void updateGnomeWorkspaceAtom() const; void setGnomeLayer(int layer); - int getGnomeWindowState(); + int getGnomeWindowState() const; bool handleGnomePropertyNotify(Atom atom); - int getGnomeLayer(); + int getGnomeLayer() const; void loadGnomeAtoms(); void loadGnomeStateAtom(); void loadGnomeHintsAtom(); -- cgit v0.11.2