diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-08-21 23:57:03 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-08-21 23:57:03 +0000 |
| commit | cc5bde6d00892cf27fcb6e4e0b4974bcecca265f (patch) | |
| tree | 1573f740857df62f526e768cd5f7d89b2218a71f /util/epist/window.cc | |
| parent | d181f1ad05332c42eb090384666171a142f54b0c (diff) | |
toggledecor almost done
some code cleanups/fixes
Diffstat (limited to 'util/epist/window.cc')
| -rw-r--r-- | util/epist/window.cc | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/util/epist/window.cc b/util/epist/window.cc index 48df206c..1e8bc227 100644 --- a/util/epist/window.cc +++ b/util/epist/window.cc @@ -44,6 +44,7 @@ XWindow::XWindow(epist *epist, screen *screen, Window window) XSelectInput(_epist->getXDisplay(), _window, PropertyChangeMask | StructureNotifyMask); + updateBlackboxAttributes(); updateNormalHints(); updateWMHints(); updateDimentions(); @@ -78,6 +79,23 @@ void XWindow::updateDimentions() { } +void XWindow::updateBlackboxAttributes() { + unsigned long *data; + unsigned long num = PropBlackboxAttributesElements; + + _decorated = true; + + if (_xatom->getValue(_window, + XAtom::blackbox_attributes, XAtom::blackbox_attributes, + num, &data)) { + if (num == PropBlackboxAttributesElements) + if (data[0] & AttribDecoration) + _decorated = (data[4] != DecorNone); + delete data; + } +} + + void XWindow::updateNormalHints() { XSizeHints size; long ret; @@ -436,3 +454,11 @@ void XWindow::maximize(Max max) const { break; } } + + +void XWindow::decorate(bool d) const { + _xatom->sendClientMessage(_screen->rootWindow(), + XAtom::blackbox_change_attributes, + _window, AttribDecoration, + 0, 0, 0, (d ? DecorNormal : DecorNone)); +} |
