minor code simplification
This commit is contained in:
parent
1e9dafdc67
commit
b1b2f47e7d
1 changed files with 13 additions and 13 deletions
|
@ -523,19 +523,19 @@ void CloseAllWindowsCmd::execute() {
|
|||
BScreen *screen = Fluxbox::instance()->mouseScreen();
|
||||
if (screen == 0)
|
||||
return;
|
||||
|
||||
|
||||
Workspace::Windows windows;
|
||||
|
||||
BScreen::Workspaces::iterator workspace_it = screen->getWorkspacesList().begin();
|
||||
BScreen::Workspaces::iterator workspace_it_end = screen->getWorkspacesList().end();
|
||||
for (; workspace_it != workspace_it_end; ++workspace_it) {
|
||||
Workspace::Windows windows((*workspace_it)->windowList());
|
||||
std::for_each(windows.begin(),
|
||||
windows.end(),
|
||||
std::mem_fun(&FluxboxWindow::close));
|
||||
}
|
||||
BScreen::Icons::iterator icon_it = screen->iconList().begin();
|
||||
BScreen::Icons::iterator icon_it_end = screen->iconList().end();
|
||||
for (; icon_it != icon_it_end; ++icon_it ) {
|
||||
(*icon_it)->close();
|
||||
}
|
||||
|
||||
for (; workspace_it != workspace_it_end; ++workspace_it) {
|
||||
windows = (*workspace_it)->windowList();
|
||||
std::for_each(windows.begin(), windows.end(),
|
||||
std::mem_fun(&FluxboxWindow::close));
|
||||
}
|
||||
|
||||
windows = screen->iconList();
|
||||
std::for_each(windows.begin(),
|
||||
windows.end(), std::mem_fun(&FluxboxWindow::close));
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue