// -*- mode: C++; indent-tabs-mode: nil; -*-
-// window.cc for Epistory - a key handler for NETWM/EWMH window managers.
+// window.cc for Epistophy - a key handler for NETWM/EWMH window managers.
// Copyright (c) 2002 - 2002 Ben Jansens <ben at orodu.net>
//
// Permission is hereby granted, free of charge, to any person obtaining a
using std::hex;
using std::dec;
-#include "window.hh"
#include "epist.hh"
+#include "screen.hh"
+#include "window.hh"
#include "../../src/XAtom.hh"
-XWindow::XWindow(epist *epist, Window window)
- : _epist(epist), _xatom(epist->xatom()), _window(window) {
+XWindow::XWindow(epist *epist, screen *screen, Window window)
+ : _epist(epist), _screen(screen), _xatom(epist->xatom()), _window(window) {
_unmapped = false;
break;
}
}
+
+
+void XWindow::shade(const bool sh) const {
+ _xatom->sendClientMessage(_screen->rootWindow(), XAtom::net_wm_state,
+ _window, (sh ? 1 : 0),
+ _xatom->getAtom(XAtom::net_wm_state_shaded));
+}
+
+
+void XWindow::close() const {
+ _xatom->sendClientMessage(_screen->rootWindow(), XAtom::net_close_window,
+ _window);
+}
+
+
+void XWindow::raise() const {
+ XRaiseWindow(_epist->getXDisplay(), _window);
+}
+
+
+void XWindow::lower() const {
+ XLowerWindow(_epist->getXDisplay(), _window);
+}