diff options
Diffstat (limited to 'src/Window.cc')
-rw-r--r-- | src/Window.cc | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/src/Window.cc b/src/Window.cc index 986b812..7aaeb41 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.154 2003/04/28 12:56:38 rathnor Exp $ | 25 | // $Id: Window.cc,v 1.155 2003/04/28 13:38:23 rathnor Exp $ |
26 | 26 | ||
27 | #include "Window.hh" | 27 | #include "Window.hh" |
28 | 28 | ||
@@ -2507,7 +2507,6 @@ void FluxboxWindow::setDecoration(Decoration decoration) { | |||
2507 | // functions.iconify = functions.maximize = true; | 2507 | // functions.iconify = functions.maximize = true; |
2508 | // functions.move = true; // We need to move even without decor | 2508 | // functions.move = true; // We need to move even without decor |
2509 | // functions.resize = true; // We need to resize even without decor | 2509 | // functions.resize = true; // We need to resize even without decor |
2510 | frame().hideAllDecorations(); | ||
2511 | break; | 2510 | break; |
2512 | 2511 | ||
2513 | default: | 2512 | default: |
@@ -2517,9 +2516,6 @@ void FluxboxWindow::setDecoration(Decoration decoration) { | |||
2517 | decorations.menu = true; | 2516 | decorations.menu = true; |
2518 | functions.resize = functions.move = functions.iconify = | 2517 | functions.resize = functions.move = functions.iconify = |
2519 | functions.maximize = true; | 2518 | functions.maximize = true; |
2520 | m_frame.showAllDecorations(); | ||
2521 | m_frame.show(); | ||
2522 | |||
2523 | break; | 2519 | break; |
2524 | 2520 | ||
2525 | case DECOR_TINY: | 2521 | case DECOR_TINY: |
@@ -2527,7 +2523,6 @@ void FluxboxWindow::setDecoration(Decoration decoration) { | |||
2527 | functions.move = functions.iconify = true; | 2523 | functions.move = functions.iconify = true; |
2528 | decorations.border = decorations.handle = decorations.maximize = | 2524 | decorations.border = decorations.handle = decorations.maximize = |
2529 | functions.resize = functions.maximize = false; | 2525 | functions.resize = functions.maximize = false; |
2530 | m_frame.show(); | ||
2531 | break; | 2526 | break; |
2532 | 2527 | ||
2533 | case DECOR_TOOL: | 2528 | case DECOR_TOOL: |
@@ -2537,11 +2532,29 @@ void FluxboxWindow::setDecoration(Decoration decoration) { | |||
2537 | functions.iconify = false; | 2532 | functions.iconify = false; |
2538 | break; | 2533 | break; |
2539 | } | 2534 | } |
2540 | 2535 | applyDecorations(); | |
2536 | // is this reconfigure necessary??? | ||
2541 | reconfigure(); | 2537 | reconfigure(); |
2542 | 2538 | ||
2543 | } | 2539 | } |
2544 | 2540 | ||
2541 | // commit current decoration values to actual displayed things | ||
2542 | void FluxboxWindow::applyDecorations() { | ||
2543 | // we rely on frame not doing anything if it is already shown/hidden | ||
2544 | if (decorations.titlebar) | ||
2545 | m_frame.showTitlebar(); | ||
2546 | else | ||
2547 | m_frame.hideTitlebar(); | ||
2548 | |||
2549 | if (decorations.handle) | ||
2550 | m_frame.showHandle(); | ||
2551 | else | ||
2552 | m_frame.hideHandle(); | ||
2553 | |||
2554 | m_frame.show(); | ||
2555 | // is reconfigure needed here? | ||
2556 | } | ||
2557 | |||
2545 | void FluxboxWindow::toggleDecoration() { | 2558 | void FluxboxWindow::toggleDecoration() { |
2546 | //don't toggle decor if the window is shaded | 2559 | //don't toggle decor if the window is shaded |
2547 | if (isShaded()) | 2560 | if (isShaded()) |
@@ -2599,6 +2612,7 @@ void FluxboxWindow::setDecorationMask(unsigned int mask) { | |||
2599 | decorations.shade = mask & DECORM_SHADE; | 2612 | decorations.shade = mask & DECORM_SHADE; |
2600 | decorations.tab = mask & DECORM_TAB; | 2613 | decorations.tab = mask & DECORM_TAB; |
2601 | decorations.enabled = mask & DECORM_ENABLED; | 2614 | decorations.enabled = mask & DECORM_ENABLED; |
2615 | applyDecorations(); | ||
2602 | } | 2616 | } |
2603 | 2617 | ||
2604 | bool FluxboxWindow::validateClient() { | 2618 | bool FluxboxWindow::validateClient() { |