X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=util%2Fepist%2Fwindow.cc;h=1d5a219dfc92af1ec8201f28276e21a9a7bc40e8;hb=7d153b742bcdf4056ac5e70f8d039f13c12319b7;hp=691dccd8d85d7b21f76f1548674b7f98d73bbf6c;hpb=24a1e215d1f8d2ff1674847278a15336d4b671b6;p=chaz%2Fopenbox diff --git a/util/epist/window.cc b/util/epist/window.cc index 691dccd8..1d5a219d 100644 --- a/util/epist/window.cc +++ b/util/epist/window.cc @@ -1,5 +1,5 @@ // -*- 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 // // Permission is hereby granted, free of charge, to any person obtaining a @@ -31,12 +31,13 @@ using std::endl; 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; @@ -140,3 +141,9 @@ void XWindow::processEvent(const XEvent &e) { break; } } + + +void XWindow::shade(const bool sh) const { + _xatom->sendClientMessage(_screen->rootWindow(), XAtom::net_wm_state, + _window, (sh ? 1 : 0), XAtom::net_wm_state_shaded); +}