aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--src/IconButton.cc15
2 files changed, 8 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index a9b89ca..6b2735a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
1 (Format: Year/Month/Day) 1 (Format: Year/Month/Day)
2Changes for 1.0rc3: 2Changes for 1.0rc3:
3*07/01/16: 3*07/01/16:
4 * Make right-clicking on iconbar button behave the same way as tabs (Mark)
5 IconButton.cc
4 * Don't force user to reconfigure manually in order to apply menu and 6 * Don't force user to reconfigure manually in order to apply menu and
5 default window transparency changes; instead, in order to conserve system 7 default window transparency changes; instead, in order to conserve system
6 resources, do it a half-second after the user stops changing them (Mark) 8 resources, do it a half-second after the user stops changing them (Mark)
diff --git a/src/IconButton.cc b/src/IconButton.cc
index eaae85e..545ee1d 100644
--- a/src/IconButton.cc
+++ b/src/IconButton.cc
@@ -30,6 +30,7 @@
30#include "Window.hh" 30#include "Window.hh"
31#include "WinClient.hh" 31#include "WinClient.hh"
32#include "CommandParser.hh" 32#include "CommandParser.hh"
33#include "WindowCmd.hh"
33 34
34#include "FbTk/App.hh" 35#include "FbTk/App.hh"
35#include "FbTk/SimpleCommand.hh" 36#include "FbTk/SimpleCommand.hh"
@@ -56,6 +57,11 @@ class ShowMenu: public FbTk::Command {
56public: 57public:
57 explicit ShowMenu(FluxboxWindow &win):m_win(win) { } 58 explicit ShowMenu(FluxboxWindow &win):m_win(win) { }
58 void execute() { 59 void execute() {
60 // hide the menu if it's already showing for this FluxboxWindow
61 if (m_win.menu().isVisible() && WindowCmd<void>::window() == &m_win) {
62 m_win.screen().hideMenus();
63 return;
64 }
59 m_win.screen().hideMenus(); 65 m_win.screen().hideMenus();
60 // get last button pos 66 // get last button pos
61 const XEvent &event = Fluxbox::instance()->lastEvent(); 67 const XEvent &event = Fluxbox::instance()->lastEvent();
@@ -146,15 +152,6 @@ IconButton::IconButton(const IconbarTool& tool, const FbTk::FbWindow &parent,
146 152
147 RefCmd next_workspace(new ::WheelWorkspaceCmd(tool, m_win, "nextworkspace")); 153 RefCmd next_workspace(new ::WheelWorkspaceCmd(tool, m_win, "nextworkspace"));
148 RefCmd prev_workspace(new ::WheelWorkspaceCmd(tool, m_win, "prevworkspace")); 154 RefCmd prev_workspace(new ::WheelWorkspaceCmd(tool, m_win, "prevworkspace"));
149
150 //!! TODO: There're some issues with MacroCommand when
151 // this object dies when the last macrocommand is executed (focused cmd)
152 // In iconbar mode Icons
153 //
154 // RefCmd hidemenus(new FbTk::SimpleCommand<BScreen>(win.screen(), &BScreen::hideMenus));
155 // FbTk::MacroCommand *focus_macro = new FbTk::MacroCommand();
156 // focus_macro->add(hidemenus);
157 // focus_macro->add(focus);
158 155
159 RefCmd focus_cmd(new ::FocusCommand(tool, m_win)); 156 RefCmd focus_cmd(new ::FocusCommand(tool, m_win));
160 RefCmd menu_cmd(new ::ShowMenu(m_win)); 157 RefCmd menu_cmd(new ::ShowMenu(m_win));