From 2944cd0014cde6a219822f120fff9588225e8776 Mon Sep 17 00:00:00 2001 From: Mark Tiefenbruck Date: Sun, 8 Jul 2012 17:56:26 -0700 Subject: [PATCH] make the menu bit of decoration masks control whether or not menu button is shown on window (it did nothing before) --- src/Window.cc | 17 +++++++++-------- src/WindowState.hh | 8 ++++---- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/Window.cc b/src/Window.cc index 3c8f87b3..747c909f 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -3613,15 +3613,16 @@ void FluxboxWindow::updateButtons() { } break; case WinButton::MENUICON: - winbtn = new WinButton(*this, m_button_theme, - screen().pressedWinButtonTheme(), - dir[i], - frame().titlebar(), - 0, 0, 10, 10); - winbtn->join(titleSig(), + if (m_state.deco_mask & WindowState::DECORM_MENU) { + winbtn = new WinButton(*this, m_button_theme, + screen().pressedWinButtonTheme(), + dir[i], + frame().titlebar(), + 0, 0, 10, 10); + winbtn->join(titleSig(), FbTk::MemFunIgnoreArgs(*winbtn, &WinButton::updateAll)); - - winbtn->setOnClick(show_menu_cmd); + winbtn->setOnClick(show_menu_cmd); + } break; } diff --git a/src/WindowState.hh b/src/WindowState.hh index 58664fa4..6b45a443 100644 --- a/src/WindowState.hh +++ b/src/WindowState.hh @@ -90,10 +90,10 @@ public: enum Decoration { DECOR_NONE = 0, DECOR_NORMAL = DECORM_LAST - 1, - DECOR_TINY = DECORM_TITLEBAR|DECORM_ICONIFY|DECORM_MENU|DECORM_TAB, - DECOR_TOOL = DECORM_TITLEBAR|DECORM_MENU, - DECOR_BORDER = DECORM_BORDER|DECORM_MENU, - DECOR_TAB = DECORM_BORDER|DECORM_MENU|DECORM_TAB + DECOR_TINY = DECORM_TITLEBAR|DECORM_ICONIFY, + DECOR_TOOL = DECORM_TITLEBAR, + DECOR_BORDER = DECORM_BORDER, + DECOR_TAB = DECORM_BORDER|DECORM_TAB }; enum WindowType {