diff options
author | markt <markt> | 2006-12-31 21:00:46 (GMT) |
---|---|---|
committer | markt <markt> | 2006-12-31 21:00:46 (GMT) |
commit | 5ee7d3e72e0cfdd7900eaef3b95c953abbb0bb04 (patch) | |
tree | fcd0fa442fbe12d7044923f324a4888c09ffb56e /src | |
parent | 9e10811c0d840df3af770b390dc10002061b47a8 (diff) | |
download | fluxbox_paul-5ee7d3e72e0cfdd7900eaef3b95c953abbb0bb04.zip fluxbox_paul-5ee7d3e72e0cfdd7900eaef3b95c953abbb0bb04.tar.bz2 |
update window scroll action and direction on reconfigure
Diffstat (limited to 'src')
-rw-r--r-- | src/Window.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/Window.cc b/src/Window.cc index 3c2cc02..b341937 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -1199,6 +1199,29 @@ void FluxboxWindow::reconfigure() { | |||
1199 | 1199 | ||
1200 | menu().reconfigure(); | 1200 | menu().reconfigure(); |
1201 | 1201 | ||
1202 | typedef FbTk::RefCount<FbTk::Command> CommandRef; | ||
1203 | typedef FbTk::SimpleCommand<FluxboxWindow> WindowCmd; | ||
1204 | CommandRef shade_on_cmd(new WindowCmd(*this, &FluxboxWindow::shadeOn)); | ||
1205 | CommandRef shade_off_cmd(new WindowCmd(*this, &FluxboxWindow::shadeOff)); | ||
1206 | CommandRef next_tab_cmd(new WindowCmd(*this, &FluxboxWindow::nextClient)); | ||
1207 | CommandRef prev_tab_cmd(new WindowCmd(*this, &FluxboxWindow::prevClient)); | ||
1208 | CommandRef null_cmd; | ||
1209 | |||
1210 | int reverse = 0; | ||
1211 | if (screen().getScrollReverse()) | ||
1212 | reverse = 1; | ||
1213 | |||
1214 | if (StringUtil::toLower(screen().getScrollAction()) == string("shade")) { | ||
1215 | frame().setOnClickTitlebar(shade_on_cmd, 5 - reverse); // shade on mouse roll | ||
1216 | frame().setOnClickTitlebar(shade_off_cmd, 4 + reverse); // unshade if rolled oposite direction | ||
1217 | } else if (StringUtil::toLower(screen().getScrollAction()) == string("nexttab")) { | ||
1218 | frame().setOnClickTitlebar(next_tab_cmd, 5 - reverse); // next tab | ||
1219 | frame().setOnClickTitlebar(prev_tab_cmd, 4 + reverse); // previous tab | ||
1220 | } else { | ||
1221 | frame().setOnClickTitlebar(null_cmd, 4); | ||
1222 | frame().setOnClickTitlebar(null_cmd, 5); | ||
1223 | } | ||
1224 | |||
1202 | } | 1225 | } |
1203 | 1226 | ||
1204 | /// update current client title and title in our frame | 1227 | /// update current client title and title in our frame |