diff options
Diffstat (limited to 'src/WorkspaceCmd.cc')
-rw-r--r-- | src/WorkspaceCmd.cc | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/src/WorkspaceCmd.cc b/src/WorkspaceCmd.cc index 2d0f501..75cf4d3 100644 --- a/src/WorkspaceCmd.cc +++ b/src/WorkspaceCmd.cc | |||
@@ -41,6 +41,25 @@ | |||
41 | #include <algorithm> | 41 | #include <algorithm> |
42 | #include <functional> | 42 | #include <functional> |
43 | 43 | ||
44 | void WindowListCmd::execute() { | ||
45 | if (m_pat.error()) { | ||
46 | m_cmd->execute(); | ||
47 | return; | ||
48 | } | ||
49 | |||
50 | BScreen *screen = Fluxbox::instance()->keyScreen(); | ||
51 | if (screen != 0) { | ||
52 | FocusControl::Focusables *win_list = &screen->focusControl().creationOrderWinList(); | ||
53 | |||
54 | FocusControl::Focusables::iterator it = win_list->begin(), | ||
55 | it_end = win_list->end(); | ||
56 | for (; it != it_end; ++it) { | ||
57 | if (m_pat.match(**it) && (*it)->fbwindow()) | ||
58 | m_cmd->execute(*(*it)->fbwindow()); | ||
59 | } | ||
60 | } | ||
61 | } | ||
62 | |||
44 | void NextWindowCmd::execute() { | 63 | void NextWindowCmd::execute() { |
45 | BScreen *screen = Fluxbox::instance()->keyScreen(); | 64 | BScreen *screen = Fluxbox::instance()->keyScreen(); |
46 | if (screen != 0) | 65 | if (screen != 0) |
@@ -266,19 +285,6 @@ void ShowDesktopCmd::execute() { | |||
266 | std::mem_fun(&FluxboxWindow::iconify)); | 285 | std::mem_fun(&FluxboxWindow::iconify)); |
267 | } | 286 | } |
268 | 287 | ||
269 | void MinimizeLayerCmd::execute() { | ||
270 | FluxboxWindow *win = FocusControl::focusedFbWindow(); | ||
271 | if (!win) | ||
272 | return; | ||
273 | |||
274 | Workspace::Windows windows(win->screen().currentWorkspace()->windowList()); | ||
275 | Workspace::Windows::iterator it = windows.begin(), it_end = windows.end(); | ||
276 | for (; it != it_end; ++it) { | ||
277 | if (win->layerNum() == (*it)->layerNum()) | ||
278 | (*it)->iconify(); | ||
279 | } | ||
280 | } | ||
281 | |||
282 | void CloseAllWindowsCmd::execute() { | 288 | void CloseAllWindowsCmd::execute() { |
283 | BScreen *screen = Fluxbox::instance()->mouseScreen(); | 289 | BScreen *screen = Fluxbox::instance()->mouseScreen(); |
284 | if (screen == 0) | 290 | if (screen == 0) |