summaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc41
1 files changed, 23 insertions, 18 deletions
diff --git a/src/Window.cc b/src/Window.cc
index d38fb8a..cb86723 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -2810,6 +2810,7 @@ void FluxboxWindow::setDecorationMask(unsigned int mask, bool apply) {
2810 decorations.shade = mask & WindowState::DECORM_SHADE; 2810 decorations.shade = mask & WindowState::DECORM_SHADE;
2811 decorations.tab = mask & WindowState::DECORM_TAB; 2811 decorations.tab = mask & WindowState::DECORM_TAB;
2812 decorations.enabled = mask & WindowState::DECORM_ENABLED; 2812 decorations.enabled = mask & WindowState::DECORM_ENABLED;
2813
2813 // we don't want to do this during initialization 2814 // we don't want to do this during initialization
2814 if (apply) 2815 if (apply)
2815 applyDecorations(); 2816 applyDecorations();
@@ -3574,7 +3575,7 @@ void FluxboxWindow::updateButtons() {
3574 3575
3575 switch (dir[i]) { 3576 switch (dir[i]) {
3576 case WinButton::MINIMIZE: 3577 case WinButton::MINIMIZE:
3577 if (isIconifiable()) { 3578 if (isIconifiable() && (m_state.deco_mask & WindowState::DECORM_ICONIFY)) {
3578 winbtn = new WinButton(*this, m_button_theme, 3579 winbtn = new WinButton(*this, m_button_theme,
3579 screen().pressedWinButtonTheme(), 3580 screen().pressedWinButtonTheme(),
3580 WinButton::MINIMIZE, 3581 WinButton::MINIMIZE,
@@ -3584,7 +3585,7 @@ void FluxboxWindow::updateButtons() {
3584 } 3585 }
3585 break; 3586 break;
3586 case WinButton::MAXIMIZE: 3587 case WinButton::MAXIMIZE:
3587 if (isMaximizable()) { 3588 if (isMaximizable() && (m_state.deco_mask & WindowState::DECORM_MAXIMIZE) ) {
3588 winbtn = new WinButton(*this, m_button_theme, 3589 winbtn = new WinButton(*this, m_button_theme,
3589 screen().pressedWinButtonTheme(), 3590 screen().pressedWinButtonTheme(),
3590 dir[i], 3591 dir[i],
@@ -3597,7 +3598,7 @@ void FluxboxWindow::updateButtons() {
3597 } 3598 }
3598 break; 3599 break;
3599 case WinButton::CLOSE: 3600 case WinButton::CLOSE:
3600 if (m_client->isClosable()) { 3601 if (m_client->isClosable() && (m_state.deco_mask & WindowState::DECORM_CLOSE)) {
3601 winbtn = new WinButton(*this, m_button_theme, 3602 winbtn = new WinButton(*this, m_button_theme,
3602 screen().pressedWinButtonTheme(), 3603 screen().pressedWinButtonTheme(),
3603 dir[i], 3604 dir[i],
@@ -3609,23 +3610,27 @@ void FluxboxWindow::updateButtons() {
3609 } 3610 }
3610 break; 3611 break;
3611 case WinButton::STICK: 3612 case WinButton::STICK:
3612 winbtn = new WinButton(*this, m_button_theme, 3613 if (m_state.deco_mask & WindowState::DECORM_STICKY) {
3613 screen().pressedWinButtonTheme(), 3614 winbtn = new WinButton(*this, m_button_theme,
3614 dir[i], 3615 screen().pressedWinButtonTheme(),
3615 frame().titlebar(), 3616 dir[i],
3616 0, 0, 10, 10); 3617 frame().titlebar(),
3617 3618 0, 0, 10, 10);
3618 stateSig().attach(winbtn); 3619
3619 winbtn->setOnClick(stick_cmd); 3620 stateSig().attach(winbtn);
3621 winbtn->setOnClick(stick_cmd);
3622 }
3620 break; 3623 break;
3621 case WinButton::SHADE: 3624 case WinButton::SHADE:
3622 winbtn = new WinButton(*this, m_button_theme, 3625 if (m_state.deco_mask & WindowState::DECORM_SHADE) {
3623 screen().pressedWinButtonTheme(), 3626 winbtn = new WinButton(*this, m_button_theme,
3624 dir[i], 3627 screen().pressedWinButtonTheme(),
3625 frame().titlebar(), 3628 dir[i],
3626 0, 0, 10, 10); 3629 frame().titlebar(),
3627 stateSig().attach(winbtn); 3630 0, 0, 10, 10);
3628 winbtn->setOnClick(shade_cmd); 3631 stateSig().attach(winbtn);
3632 winbtn->setOnClick(shade_cmd);
3633 }
3629 break; 3634 break;
3630 case WinButton::MENUICON: 3635 case WinButton::MENUICON:
3631 winbtn = new WinButton(*this, m_button_theme, 3636 winbtn = new WinButton(*this, m_button_theme,