diff --git a/ChangeLog b/ChangeLog index a9b89cad..6b2735ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ (Format: Year/Month/Day) Changes for 1.0rc3: *07/01/16: + * Make right-clicking on iconbar button behave the same way as tabs (Mark) + IconButton.cc * Don't force user to reconfigure manually in order to apply menu and default window transparency changes; instead, in order to conserve system resources, do it a half-second after the user stops changing them (Mark) diff --git a/src/IconButton.cc b/src/IconButton.cc index eaae85e3..545ee1d7 100644 --- a/src/IconButton.cc +++ b/src/IconButton.cc @@ -30,6 +30,7 @@ #include "Window.hh" #include "WinClient.hh" #include "CommandParser.hh" +#include "WindowCmd.hh" #include "FbTk/App.hh" #include "FbTk/SimpleCommand.hh" @@ -56,6 +57,11 @@ class ShowMenu: public FbTk::Command { public: explicit ShowMenu(FluxboxWindow &win):m_win(win) { } void execute() { + // hide the menu if it's already showing for this FluxboxWindow + if (m_win.menu().isVisible() && WindowCmd::window() == &m_win) { + m_win.screen().hideMenus(); + return; + } m_win.screen().hideMenus(); // get last button pos const XEvent &event = Fluxbox::instance()->lastEvent(); @@ -146,15 +152,6 @@ IconButton::IconButton(const IconbarTool& tool, const FbTk::FbWindow &parent, RefCmd next_workspace(new ::WheelWorkspaceCmd(tool, m_win, "nextworkspace")); RefCmd prev_workspace(new ::WheelWorkspaceCmd(tool, m_win, "prevworkspace")); - - //!! TODO: There're some issues with MacroCommand when - // this object dies when the last macrocommand is executed (focused cmd) - // In iconbar mode Icons - // - // RefCmd hidemenus(new FbTk::SimpleCommand(win.screen(), &BScreen::hideMenus)); - // FbTk::MacroCommand *focus_macro = new FbTk::MacroCommand(); - // focus_macro->add(hidemenus); - // focus_macro->add(focus); RefCmd focus_cmd(new ::FocusCommand(tool, m_win)); RefCmd menu_cmd(new ::ShowMenu(m_win));