diff -Nru fluxbox-0.9.13.original/src/Screen.cc fluxbox-0.9.13/src/Screen.cc --- fluxbox-0.9.13.original/src/Screen.cc 2005-09-07 19:16:40.000000000 +0200 +++ fluxbox-0.9.13/src/Screen.cc 2005-09-07 19:39:11.000000000 +0200 @@ -201,7 +201,10 @@ gc_cap_style(rm, FbTk::GContext::CAPNOTLAST, scrname+".overlay.capStyle", - altscrname+".overlay.CapStyle") { + altscrname+".overlay.CapStyle"), + scroll_action(rm, "", scrname+".windowScrollAction", altscrname+".WindowScrollAction"), + scroll_reverse(rm, false, scrname+".windowScrollReverse", altscrname+".WindowScrollReverse") { + } diff -Nru fluxbox-0.9.13.original/src/Screen.hh fluxbox-0.9.13/src/Screen.hh --- fluxbox-0.9.13.original/src/Screen.hh 2005-09-07 19:16:40.000000000 +0200 +++ fluxbox-0.9.13/src/Screen.hh 2005-09-07 19:39:11.000000000 +0200 @@ -133,6 +133,9 @@ inline FocusModel getFocusModel() const { return *resource.focus_model; } inline FollowModel getFollowModel() const { return *resource.follow_model; } + inline const std::string &getScrollAction() const { return *resource.scroll_action; } + inline const bool getScrollReverse() const { return *resource.scroll_reverse; } + inline Slit *slit() { return m_slit.get(); } inline const Slit *slit() const { return m_slit.get(); } @@ -453,6 +456,8 @@ FbTk::Resource gc_line_style; FbTk::Resource gc_join_style; FbTk::Resource gc_cap_style; + FbTk::Resource scroll_action; + FbTk::Resource scroll_reverse; } resource; diff -Nru fluxbox-0.9.13.original/src/Window.cc fluxbox-0.9.13/src/Window.cc --- fluxbox-0.9.13.original/src/Window.cc 2005-09-07 19:16:40.000000000 +0200 +++ fluxbox-0.9.13/src/Window.cc 2005-09-07 19:39:11.000000000 +0200 @@ -38,6 +38,7 @@ #include "WinButtonTheme.hh" #include "Remember.hh" #include "MenuCreator.hh" +#include "StringUtil.hh" #include "FbTk/I18n.hh" #include "FbTk/TextButton.hh" @@ -1796,6 +1797,19 @@ } +void FluxboxWindow::shadeOn() { + + if (!shaded) + shade(); + +} + +void FluxboxWindow::shadeOff() { + + if (shaded) + shade(); + +} void FluxboxWindow::stick() { @@ -3781,6 +3795,10 @@ CommandRef maximize_horiz_cmd(new WindowCmd(*this, &FluxboxWindow::maximizeHorizontal)); CommandRef close_cmd(new WindowCmd(*this, &FluxboxWindow::close)); CommandRef shade_cmd(new WindowCmd(*this, &FluxboxWindow::shade)); + CommandRef shade_on_cmd(new WindowCmd(*this, &FluxboxWindow::shadeOn)); + CommandRef shade_off_cmd(new WindowCmd(*this, &FluxboxWindow::shadeOff)); + CommandRef next_tab_cmd(new WindowCmd(*this, &FluxboxWindow::nextClient)); + CommandRef prev_tab_cmd(new WindowCmd(*this, &FluxboxWindow::prevClient)); CommandRef raise_cmd(new WindowCmd(*this, &FluxboxWindow::raise)); CommandRef lower_cmd(new WindowCmd(*this, &FluxboxWindow::lower)); CommandRef raise_and_focus_cmd(new WindowCmd(*this, &FluxboxWindow::raiseAndFocus)); @@ -3866,6 +3884,19 @@ frame().setOnClickTitlebar(shade_cmd, 1, true); // doubleclick with button 1 frame().setOnClickTitlebar(show_menu_cmd, 3); // on release with button 3 frame().setOnClickTitlebar(lower_cmd, 2); // on release with button 2 + + int reverse = 0; + if (screen().getScrollReverse()) + reverse = 1; + + if (StringUtil::toLower(screen().getScrollAction()) == std::string("shade")) { + frame().setOnClickTitlebar(shade_on_cmd, 5 - reverse); // shade on mouse roll + frame().setOnClickTitlebar(shade_off_cmd, 4 + reverse); // unshade if rolled oposite direction + } else if (StringUtil::toLower(screen().getScrollAction()) == std::string("nexttab")) { + frame().setOnClickTitlebar(next_tab_cmd, 5 - reverse); // next tab + frame().setOnClickTitlebar(prev_tab_cmd, 4 + reverse); // previous tab + } + frame().setDoubleClickTime(Fluxbox::instance()->getDoubleClickInterval()); // end setup frame diff -Nru fluxbox-0.9.13.original/src/Window.hh fluxbox-0.9.13/src/Window.hh --- fluxbox-0.9.13.original/src/Window.hh 2005-09-07 19:16:40.000000000 +0200 +++ fluxbox-0.9.13/src/Window.hh 2005-09-07 19:39:11.000000000 +0200 @@ -211,6 +211,10 @@ void maximizeFull(); /// toggles shade void shade(); + /// shades window + void shadeOn(); + /// unshades window + void shadeOff(); /// toggles sticky void stick(); void raise();