aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/Window.cc b/src/Window.cc
index f8b4457..523fd66 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -447,18 +447,8 @@ void FluxboxWindow::init() {
447 m_blackbox_attrib.premax_x = m_blackbox_attrib.premax_y = 0; 447 m_blackbox_attrib.premax_x = m_blackbox_attrib.premax_y = 0;
448 m_blackbox_attrib.premax_w = m_blackbox_attrib.premax_h = 0; 448 m_blackbox_attrib.premax_w = m_blackbox_attrib.premax_h = 0;
449 449
450 //use tab as default 450 // set default decorations but don't apply them
451 decorations.tab = true; 451 setDecorationMask(screen().defaultDeco(), false);
452 // enable decorations
453 decorations.enabled = true;
454
455 // set default values for decoration
456 decorations.menu = true; //override menu option
457 // all decorations on by default
458 decorations.titlebar = decorations.border = decorations.handle = true;
459 decorations.maximize = decorations.close =
460 decorations.sticky = decorations.shade = decorations.tab = true;
461
462 452
463 functions.resize = functions.move = functions.iconify = functions.maximize = functions.close = functions.tabable = true; 453 functions.resize = functions.move = functions.iconify = functions.maximize = functions.close = functions.tabable = true;
464 decorations.close = false; 454 decorations.close = false;
@@ -3298,7 +3288,7 @@ unsigned int FluxboxWindow::decorationMask() const {
3298 return ret; 3288 return ret;
3299} 3289}
3300 3290
3301void FluxboxWindow::setDecorationMask(unsigned int mask) { 3291void FluxboxWindow::setDecorationMask(unsigned int mask, bool apply) {
3302 decorations.titlebar = mask & DECORM_TITLEBAR; 3292 decorations.titlebar = mask & DECORM_TITLEBAR;
3303 decorations.handle = mask & DECORM_HANDLE; 3293 decorations.handle = mask & DECORM_HANDLE;
3304 decorations.border = mask & DECORM_BORDER; 3294 decorations.border = mask & DECORM_BORDER;
@@ -3310,7 +3300,9 @@ void FluxboxWindow::setDecorationMask(unsigned int mask) {
3310 decorations.shade = mask & DECORM_SHADE; 3300 decorations.shade = mask & DECORM_SHADE;
3311 decorations.tab = mask & DECORM_TAB; 3301 decorations.tab = mask & DECORM_TAB;
3312 decorations.enabled = mask & DECORM_ENABLED; 3302 decorations.enabled = mask & DECORM_ENABLED;
3313 applyDecorations(); 3303 // we don't want to do this during initialization
3304 if (apply)
3305 applyDecorations();
3314} 3306}
3315 3307
3316void FluxboxWindow::startMoving(int x, int y) { 3308void FluxboxWindow::startMoving(int x, int y) {