diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2009-09-12 14:19:46 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2009-09-12 14:19:46 (GMT) |
commit | 5a3f25cda17d5381873431a5404944b63176c966 (patch) | |
tree | 955300b6f9e11aa43834c72cefd73804df2bb0e5 | |
parent | 5f958b3bd5c33282ab5b772854d96d4d2a6b72e6 (diff) | |
download | fluxbox_pavel-5a3f25cda17d5381873431a5404944b63176c966.zip fluxbox_pavel-5a3f25cda17d5381873431a5404944b63176c966.tar.bz2 |
implemented visibility of titlebar buttons via the apps file
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/Window.cc | 41 |
2 files changed, 28 insertions, 18 deletions
@@ -1,5 +1,9 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 1.1.2 | 2 | Changes for 1.1.2 |
3 | *09/09/12: | ||
4 | * Implemented visibility of titlebar buttons via the apps file (Mathias) | ||
5 | Window.cc | ||
6 | |||
3 | *09/06/28: | 7 | *09/06/28: |
4 | * Allow matching screen number in ClientPattern (thanks Peter Hercek) | 8 | * Allow matching screen number in ClientPattern (thanks Peter Hercek) |
5 | ClientPattern.cc | 9 | ClientPattern.cc |
@@ -13,6 +17,7 @@ Changes for 1.1.2 | |||
13 | Keys.cc | 17 | Keys.cc |
14 | * Revert to relative iconbar alignment when too many windows are open (Mark) | 18 | * Revert to relative iconbar alignment when too many windows are open (Mark) |
15 | FbTk/Container.cc | 19 | FbTk/Container.cc |
20 | |||
16 | *09/05/26: | 21 | *09/05/26: |
17 | * Fixed unexpected window focus changes under "focus follows mouse" (Jim) | 22 | * Fixed unexpected window focus changes under "focus follows mouse" (Jim) |
18 | FocusControl.cc/hh Window.cc fluxbox.cc Screen.cc | 23 | FocusControl.cc/hh Window.cc fluxbox.cc Screen.cc |
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, |