summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-04-28 13:38:23 (GMT)
committerrathnor <rathnor>2003-04-28 13:38:23 (GMT)
commite7b893beba45053ff05a8a192d198b7c5d7918bf (patch)
treee64180a52c308a1ee0a192092903c1927cd7ab08 /src
parentc67517647ab26fc05739dcfbff14bf2b671502fd (diff)
downloadfluxbox_lack-e7b893beba45053ff05a8a192d198b7c5d7918bf.zip
fluxbox_lack-e7b893beba45053ff05a8a192d198b7c5d7918bf.tar.bz2
fixing remembering of decorations
Diffstat (limited to 'src')
-rw-r--r--src/Window.cc28
-rw-r--r--src/Window.hh3
2 files changed, 23 insertions, 8 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
2542void 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
2545void FluxboxWindow::toggleDecoration() { 2558void 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
2604bool FluxboxWindow::validateClient() { 2618bool FluxboxWindow::validateClient() {
diff --git a/src/Window.hh b/src/Window.hh
index cbeb6ac..d8ddcdd 100644
--- a/src/Window.hh
+++ b/src/Window.hh
@@ -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.hh,v 1.64 2003/04/27 14:36:05 rathnor Exp $ 25// $Id: Window.hh,v 1.65 2003/04/28 13:38:23 rathnor Exp $
26 26
27#ifndef WINDOW_HH 27#ifndef WINDOW_HH
28#define WINDOW_HH 28#define WINDOW_HH
@@ -202,6 +202,7 @@ public:
202 //@} 202 //@}
203 203
204 void setDecoration(Decoration decoration); 204 void setDecoration(Decoration decoration);
205 void applyDecorations();
205 void toggleDecoration(); 206 void toggleDecoration();
206 207
207 /** 208 /**