diff options
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r-- | src/fluxbox.cc | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index a55bd29..1339197 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc | |||
@@ -119,12 +119,12 @@ using std::string; | |||
119 | using std::vector; | 119 | using std::vector; |
120 | using std::list; | 120 | using std::list; |
121 | using std::pair; | 121 | using std::pair; |
122 | using std::bind2nd; | 122 | using std::mem_fn; |
123 | using std::mem_fun; | ||
124 | using std::equal_to; | 123 | using std::equal_to; |
125 | using std::hex; | 124 | using std::hex; |
126 | using std::dec; | 125 | using std::dec; |
127 | 126 | ||
127 | using namespace std::placeholders; | ||
128 | using namespace FbTk; | 128 | using namespace FbTk; |
129 | 129 | ||
130 | namespace { | 130 | namespace { |
@@ -212,7 +212,7 @@ typedef FbTk::SimpleCommand<Fluxbox> FluxboxCmd; | |||
212 | a newer compiler. | 212 | a newer compiler. |
213 | */ | 213 | */ |
214 | template <typename Type, typename ArgType, typename ResultType> | 214 | template <typename Type, typename ArgType, typename ResultType> |
215 | struct CallMemFunWithRefArg : std::unary_function<Type, ResultType> { | 215 | struct CallMemFunWithRefArg { |
216 | 216 | ||
217 | explicit CallMemFunWithRefArg(ResultType (Type::*func)(ArgType), ArgType arg) : | 217 | explicit CallMemFunWithRefArg(ResultType (Type::*func)(ArgType), ArgType arg) : |
218 | m_arg(arg), | 218 | m_arg(arg), |
@@ -446,7 +446,7 @@ Fluxbox::Fluxbox(int argc, char **argv, | |||
446 | #endif // REMEMBER | 446 | #endif // REMEMBER |
447 | 447 | ||
448 | // init all "screens" | 448 | // init all "screens" |
449 | STLUtil::forAll(m_screens, bind1st(mem_fun(&Fluxbox::initScreen), this)); | 449 | STLUtil::forAll(m_screens, std::bind(mem_fn(&Fluxbox::initScreen), this, _1)); |
450 | 450 | ||
451 | XAllowEvents(disp, ReplayPointer, CurrentTime); | 451 | XAllowEvents(disp, ReplayPointer, CurrentTime); |
452 | 452 | ||
@@ -514,7 +514,7 @@ void Fluxbox::initScreen(BScreen *screen) { | |||
514 | // initiate atomhandler for screen specific stuff | 514 | // initiate atomhandler for screen specific stuff |
515 | STLUtil::forAll(m_atomhandler, | 515 | STLUtil::forAll(m_atomhandler, |
516 | CallMemFunWithRefArg<AtomHandler, BScreen&, void>(&AtomHandler::initForScreen, *screen)); | 516 | CallMemFunWithRefArg<AtomHandler, BScreen&, void>(&AtomHandler::initForScreen, *screen)); |
517 | //STLUtil::forAll(m_atomhandler, bind2nd(mem_fun(&AtomHandler::initForScreen), *screen)); | 517 | //STLUtil::forAll(m_atomhandler, bind2nd(mem_fn(&AtomHandler::initForScreen), *screen)); |
518 | 518 | ||
519 | FocusControl::revertFocus(*screen); // make sure focus style is correct | 519 | FocusControl::revertFocus(*screen); // make sure focus style is correct |
520 | 520 | ||
@@ -898,7 +898,7 @@ void Fluxbox::handleClientMessage(XClientMessageEvent &ce) { | |||
898 | void Fluxbox::windowDied(Focusable &focusable) { | 898 | void Fluxbox::windowDied(Focusable &focusable) { |
899 | FluxboxWindow *fbwin = focusable.fbwindow(); | 899 | FluxboxWindow *fbwin = focusable.fbwindow(); |
900 | 900 | ||
901 | STLUtil::forAllIf(m_atomhandler, mem_fun(&AtomHandler::update), | 901 | STLUtil::forAllIf(m_atomhandler, mem_fn(&AtomHandler::update), |
902 | CallMemFunWithRefArg<AtomHandler, FluxboxWindow&, void>(&AtomHandler::updateFrameClose, *focusable.fbwindow())); | 902 | CallMemFunWithRefArg<AtomHandler, FluxboxWindow&, void>(&AtomHandler::updateFrameClose, *focusable.fbwindow())); |
903 | 903 | ||
904 | // make sure each workspace get this | 904 | // make sure each workspace get this |
@@ -911,7 +911,7 @@ void Fluxbox::windowDied(Focusable &focusable) { | |||
911 | void Fluxbox::clientDied(Focusable &focusable) { | 911 | void Fluxbox::clientDied(Focusable &focusable) { |
912 | WinClient &client = dynamic_cast<WinClient &>(focusable); | 912 | WinClient &client = dynamic_cast<WinClient &>(focusable); |
913 | 913 | ||
914 | STLUtil::forAllIf(m_atomhandler, mem_fun(&AtomHandler::update), | 914 | STLUtil::forAllIf(m_atomhandler, mem_fn(&AtomHandler::update), |
915 | CallMemFunWithRefArg<AtomHandler, WinClient&, void>(&AtomHandler::updateClientClose, client)); | 915 | CallMemFunWithRefArg<AtomHandler, WinClient&, void>(&AtomHandler::updateClientClose, client)); |
916 | 916 | ||
917 | BScreen &screen = client.screen(); | 917 | BScreen &screen = client.screen(); |
@@ -935,12 +935,12 @@ void Fluxbox::clientDied(Focusable &focusable) { | |||
935 | } | 935 | } |
936 | 936 | ||
937 | void Fluxbox::windowWorkspaceChanged(FluxboxWindow &win) { | 937 | void Fluxbox::windowWorkspaceChanged(FluxboxWindow &win) { |
938 | STLUtil::forAllIf(m_atomhandler, mem_fun(&AtomHandler::update), | 938 | STLUtil::forAllIf(m_atomhandler, mem_fn(&AtomHandler::update), |
939 | CallMemFunWithRefArg<AtomHandler, FluxboxWindow&, void>(&AtomHandler::updateWorkspace, win)); | 939 | CallMemFunWithRefArg<AtomHandler, FluxboxWindow&, void>(&AtomHandler::updateWorkspace, win)); |
940 | } | 940 | } |
941 | 941 | ||
942 | void Fluxbox::windowStateChanged(FluxboxWindow &win) { | 942 | void Fluxbox::windowStateChanged(FluxboxWindow &win) { |
943 | STLUtil::forAllIf(m_atomhandler, mem_fun(&AtomHandler::update), | 943 | STLUtil::forAllIf(m_atomhandler, mem_fn(&AtomHandler::update), |
944 | CallMemFunWithRefArg<AtomHandler, FluxboxWindow&, void>(&AtomHandler::updateState, win)); | 944 | CallMemFunWithRefArg<AtomHandler, FluxboxWindow&, void>(&AtomHandler::updateState, win)); |
945 | 945 | ||
946 | // if window changed to iconic state | 946 | // if window changed to iconic state |
@@ -962,7 +962,7 @@ void Fluxbox::windowStateChanged(FluxboxWindow &win) { | |||
962 | } | 962 | } |
963 | 963 | ||
964 | void Fluxbox::windowLayerChanged(FluxboxWindow &win) { | 964 | void Fluxbox::windowLayerChanged(FluxboxWindow &win) { |
965 | STLUtil::forAllIf(m_atomhandler, mem_fun(&AtomHandler::update), | 965 | STLUtil::forAllIf(m_atomhandler, mem_fn(&AtomHandler::update), |
966 | CallMemFunWithRefArg<AtomHandler, FluxboxWindow&, void>(&AtomHandler::updateLayer, win)); | 966 | CallMemFunWithRefArg<AtomHandler, FluxboxWindow&, void>(&AtomHandler::updateLayer, win)); |
967 | } | 967 | } |
968 | 968 | ||
@@ -1103,7 +1103,7 @@ void Fluxbox::shutdown(int x_wants_down) { | |||
1103 | XSetInputFocus(dpy, PointerRoot, None, CurrentTime); | 1103 | XSetInputFocus(dpy, PointerRoot, None, CurrentTime); |
1104 | 1104 | ||
1105 | if (x_wants_down == 0) { | 1105 | if (x_wants_down == 0) { |
1106 | STLUtil::forAll(m_screens, mem_fun(&BScreen::shutdown)); | 1106 | STLUtil::forAll(m_screens, mem_fn(&BScreen::shutdown)); |
1107 | sync(false); | 1107 | sync(false); |
1108 | } | 1108 | } |
1109 | } | 1109 | } |
@@ -1305,9 +1305,9 @@ void Fluxbox::real_reconfigure() { | |||
1305 | for (; screen_it != screen_it_end; ++screen_it) | 1305 | for (; screen_it != screen_it_end; ++screen_it) |
1306 | load_rc(*(*screen_it)); | 1306 | load_rc(*(*screen_it)); |
1307 | 1307 | ||
1308 | STLUtil::forAll(m_screens, mem_fun(&BScreen::reconfigure)); | 1308 | STLUtil::forAll(m_screens, mem_fn(&BScreen::reconfigure)); |
1309 | m_key->reconfigure(); | 1309 | m_key->reconfigure(); |
1310 | STLUtil::forAll(m_atomhandler, mem_fun(&AtomHandler::reconfigure)); | 1310 | STLUtil::forAll(m_atomhandler, mem_fn(&AtomHandler::reconfigure)); |
1311 | FbTk::MenuSearch::setMode(*m_config.menusearch); | 1311 | FbTk::MenuSearch::setMode(*m_config.menusearch); |
1312 | } | 1312 | } |
1313 | 1313 | ||
@@ -1362,7 +1362,7 @@ bool Fluxbox::validateClient(const WinClient *client) const { | |||
1362 | WinClientMap::const_iterator it = | 1362 | WinClientMap::const_iterator it = |
1363 | find_if(m_window_search.begin(), | 1363 | find_if(m_window_search.begin(), |
1364 | m_window_search.end(), | 1364 | m_window_search.end(), |
1365 | Compose(bind2nd(equal_to<const WinClient *>(), client), | 1365 | Compose(std::bind(equal_to<const WinClient *>(), _1, client), |
1366 | Select2nd<WinClientMap::value_type>())); | 1366 | Select2nd<WinClientMap::value_type>())); |
1367 | return it != m_window_search.end(); | 1367 | return it != m_window_search.end(); |
1368 | } | 1368 | } |
@@ -1373,22 +1373,22 @@ void Fluxbox::updateFrameExtents(FluxboxWindow &win) { | |||
1373 | } | 1373 | } |
1374 | 1374 | ||
1375 | void Fluxbox::workspaceCountChanged( BScreen& screen ) { | 1375 | void Fluxbox::workspaceCountChanged( BScreen& screen ) { |
1376 | STLUtil::forAllIf(m_atomhandler, mem_fun(&AtomHandler::update), | 1376 | STLUtil::forAllIf(m_atomhandler, mem_fn(&AtomHandler::update), |
1377 | CallMemFunWithRefArg<AtomHandler, BScreen&, void>(&AtomHandler::updateWorkspaceCount, screen)); | 1377 | CallMemFunWithRefArg<AtomHandler, BScreen&, void>(&AtomHandler::updateWorkspaceCount, screen)); |
1378 | } | 1378 | } |
1379 | 1379 | ||
1380 | void Fluxbox::workspaceChanged( BScreen& screen ) { | 1380 | void Fluxbox::workspaceChanged( BScreen& screen ) { |
1381 | STLUtil::forAllIf(m_atomhandler, mem_fun(&AtomHandler::update), | 1381 | STLUtil::forAllIf(m_atomhandler, mem_fn(&AtomHandler::update), |
1382 | CallMemFunWithRefArg<AtomHandler, BScreen&, void>(&AtomHandler::updateCurrentWorkspace, screen)); | 1382 | CallMemFunWithRefArg<AtomHandler, BScreen&, void>(&AtomHandler::updateCurrentWorkspace, screen)); |
1383 | } | 1383 | } |
1384 | 1384 | ||
1385 | void Fluxbox::workspaceNamesChanged(BScreen &screen) { | 1385 | void Fluxbox::workspaceNamesChanged(BScreen &screen) { |
1386 | STLUtil::forAllIf(m_atomhandler, mem_fun(&AtomHandler::update), | 1386 | STLUtil::forAllIf(m_atomhandler, mem_fn(&AtomHandler::update), |
1387 | CallMemFunWithRefArg<AtomHandler, BScreen&, void>(&AtomHandler::updateWorkspaceNames, screen)); | 1387 | CallMemFunWithRefArg<AtomHandler, BScreen&, void>(&AtomHandler::updateWorkspaceNames, screen)); |
1388 | } | 1388 | } |
1389 | 1389 | ||
1390 | void Fluxbox::clientListChanged(BScreen &screen) { | 1390 | void Fluxbox::clientListChanged(BScreen &screen) { |
1391 | STLUtil::forAllIf(m_atomhandler, mem_fun(&AtomHandler::update), | 1391 | STLUtil::forAllIf(m_atomhandler, mem_fn(&AtomHandler::update), |
1392 | CallMemFunWithRefArg<AtomHandler, BScreen&, void>(&AtomHandler::updateClientList, screen)); | 1392 | CallMemFunWithRefArg<AtomHandler, BScreen&, void>(&AtomHandler::updateClientList, screen)); |
1393 | } | 1393 | } |
1394 | 1394 | ||
@@ -1403,7 +1403,7 @@ void Fluxbox::focusedWindowChanged(BScreen &screen, | |||
1403 | } | 1403 | } |
1404 | 1404 | ||
1405 | void Fluxbox::workspaceAreaChanged(BScreen &screen) { | 1405 | void Fluxbox::workspaceAreaChanged(BScreen &screen) { |
1406 | STLUtil::forAllIf(m_atomhandler, mem_fun(&AtomHandler::update), | 1406 | STLUtil::forAllIf(m_atomhandler, mem_fn(&AtomHandler::update), |
1407 | CallMemFunWithRefArg<AtomHandler, BScreen&, void>(&AtomHandler::updateWorkarea, screen)); | 1407 | CallMemFunWithRefArg<AtomHandler, BScreen&, void>(&AtomHandler::updateWorkarea, screen)); |
1408 | } | 1408 | } |
1409 | 1409 | ||