const on updateGnome* functions

This commit is contained in:
fluxgen 2002-05-07 13:31:11 +00:00
parent eaecf66a23
commit a10c34918c
2 changed files with 18 additions and 19 deletions

View file

@ -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;

View file

@ -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();