all repos — fluxbox @ 40c44b227bd93a365e214ebfa410eae01a56b5fb

custom fork of the fluxbox windowmanager

mouse scroll on icons changes workspace
fluxgen fluxgen
commit

40c44b227bd93a365e214ebfa410eae01a56b5fb

parent

4179d518296f8231d8a29359b7c6e4bae03c22fb

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

jump to
M src/IconButton.ccsrc/IconButton.cc

@@ -20,7 +20,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: IconButton.cc,v 1.21 2004/06/16 15:38:19 rathnor Exp $ +// $Id: IconButton.cc,v 1.22 2004/07/15 14:20:19 fluxgen Exp $ #include "IconButton.hh"

@@ -29,6 +29,7 @@ #include "fluxbox.hh"

#include "Screen.hh" #include "Window.hh" #include "WinClient.hh" +#include "CommandParser.hh" #include "FbTk/App.hh" #include "FbTk/SimpleCommand.hh"

@@ -93,7 +94,10 @@ m_icon_window(*this, 1, 1, 1, 1,

ExposureMask | ButtonPressMask | ButtonReleaseMask), m_use_pixmap(true) { - FbTk::RefCount<FbTk::Command> hidemenus(new FbTk::SimpleCommand<BScreen>(win.screen(), &BScreen::hideMenus)); + typedef FbTk::RefCount<FbTk::Command> RefCmd; + RefCmd hidemenus(new FbTk::SimpleCommand<BScreen>(win.screen(), &BScreen::hideMenus)); + RefCmd next_workspace(CommandParser::instance().parseLine("nextworkspace")); + RefCmd prev_workspace(CommandParser::instance().parseLine("prevworkspace")); //!! TODO: There're some issues with MacroCommand when // this object dies when the last macrocommand is executed (focused cmd) // In iconbar mode Icons

@@ -104,6 +108,8 @@ FbTk::RefCount<FbTk::Command> focus_cmd(new ::FocusCommand(m_win));

FbTk::RefCount<FbTk::Command> menu_cmd(new ::ShowMenu(m_win)); setOnClick(focus_cmd, 1); setOnClick(menu_cmd, 3); + setOnClick(next_workspace, 4); + setOnClick(prev_workspace, 5); m_win.hintSig().attach(this); FbTk::EventManager::instance()->add(*this, m_icon_window);