all repos — fluxbox @ a8e3f500c29c9d0c94233ce499e54fadd83fa764

custom fork of the fluxbox windowmanager

right click on iconbutton toggles menu
markt markt
commit

a8e3f500c29c9d0c94233ce499e54fadd83fa764

parent

4bb6a027e31cd91b06eecd1cd942f7a2d8cd8fa2

2 files changed, 8 insertions(+), 9 deletions(-)

jump to
M ChangeLogChangeLog

@@ -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)
M src/IconButton.ccsrc/IconButton.cc

@@ -30,6 +30,7 @@ #include "Screen.hh"

#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<void>::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 @@

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<BScreen>(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));