all repos — fluxbox @ 5ee7d3e72e0cfdd7900eaef3b95c953abbb0bb04

custom fork of the fluxbox windowmanager

update window scroll action and direction on reconfigure
markt markt
commit

5ee7d3e72e0cfdd7900eaef3b95c953abbb0bb04

parent

9e10811c0d840df3af770b390dc10002061b47a8

2 files changed, 25 insertions(+), 0 deletions(-)

jump to
M ChangeLogChangeLog

@@ -8,6 +8,8 @@ Similar fix for gnome current workspace... remember that XA_CARDINAL

"32-bit" type is actually a "long array" argument (=64bit on 64 systems) Ewmh.cc Gnome.cc *06/12/31: + * Update window scroll action (and direction) on reconfigure (Mark) + Window.cc * Update toolbar visibility on reconfigure (Mark) Toolbar.cc *06/12/28:
M src/Window.ccsrc/Window.cc

@@ -1199,6 +1199,29 @@ frame().reconfigure();

menu().reconfigure(); + typedef FbTk::RefCount<FbTk::Command> CommandRef; + typedef FbTk::SimpleCommand<FluxboxWindow> WindowCmd; + 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 null_cmd; + + int reverse = 0; + if (screen().getScrollReverse()) + reverse = 1; + + if (StringUtil::toLower(screen().getScrollAction()) == 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()) == string("nexttab")) { + frame().setOnClickTitlebar(next_tab_cmd, 5 - reverse); // next tab + frame().setOnClickTitlebar(prev_tab_cmd, 4 + reverse); // previous tab + } else { + frame().setOnClickTitlebar(null_cmd, 4); + frame().setOnClickTitlebar(null_cmd, 5); + } + } /// update current client title and title in our frame