diff options
Diffstat (limited to 'src/Window.cc')
-rw-r--r-- | src/Window.cc | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/src/Window.cc b/src/Window.cc index 10db141..b6e29c7 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Window.cc,v 1.148 2003/04/25 16:11:00 fluxgen Exp $ | 25 | // $Id: Window.cc,v 1.149 2003/04/26 05:42:35 rathnor Exp $ |
26 | 26 | ||
27 | #include "Window.hh" | 27 | #include "Window.hh" |
28 | 28 | ||
@@ -2556,6 +2556,47 @@ void FluxboxWindow::toggleDecoration() { | |||
2556 | } | 2556 | } |
2557 | } | 2557 | } |
2558 | 2558 | ||
2559 | unsigned int FluxboxWindow::getDecorationMask() const { | ||
2560 | unsigned int ret = 0; | ||
2561 | if (decorations.titlebar) | ||
2562 | ret |= DECORM_TITLEBAR; | ||
2563 | if (decorations.handle) | ||
2564 | ret |= DECORM_HANDLE; | ||
2565 | if (decorations.border) | ||
2566 | ret |= DECORM_BORDER; | ||
2567 | if (decorations.iconify) | ||
2568 | ret |= DECORM_ICONIFY; | ||
2569 | if (decorations.maximize) | ||
2570 | ret |= DECORM_MAXIMIZE; | ||
2571 | if (decorations.close) | ||
2572 | ret |= DECORM_CLOSE; | ||
2573 | if (decorations.menu) | ||
2574 | ret |= DECORM_MENU; | ||
2575 | if (decorations.sticky) | ||
2576 | ret |= DECORM_STICKY; | ||
2577 | if (decorations.shade) | ||
2578 | ret |= DECORM_SHADE; | ||
2579 | if (decorations.tab) | ||
2580 | ret |= DECORM_TAB; | ||
2581 | if (decorations.enabled) | ||
2582 | ret |= DECORM_ENABLED; | ||
2583 | return ret; | ||
2584 | } | ||
2585 | |||
2586 | void FluxboxWindow::setDecorationMask(unsigned int mask) { | ||
2587 | decorations.titlebar = mask & DECORM_TITLEBAR; | ||
2588 | decorations.handle = mask & DECORM_HANDLE; | ||
2589 | decorations.border = mask & DECORM_BORDER; | ||
2590 | decorations.iconify = mask & DECORM_ICONIFY; | ||
2591 | decorations.maximize = mask & DECORM_MAXIMIZE; | ||
2592 | decorations.close = mask & DECORM_CLOSE; | ||
2593 | decorations.menu = mask & DECORM_MENU; | ||
2594 | decorations.sticky = mask & DECORM_STICKY; | ||
2595 | decorations.shade = mask & DECORM_SHADE; | ||
2596 | decorations.tab = mask & DECORM_TAB; | ||
2597 | decorations.enabled = mask & DECORM_ENABLED; | ||
2598 | } | ||
2599 | |||
2559 | bool FluxboxWindow::validateClient() { | 2600 | bool FluxboxWindow::validateClient() { |
2560 | XSync(display, false); | 2601 | XSync(display, false); |
2561 | 2602 | ||