aboutsummaryrefslogtreecommitdiff
path: root/src/WorkspaceCmd.cc
diff options
context:
space:
mode:
authormarkt <markt>2007-03-31 17:11:59 (GMT)
committermarkt <markt>2007-03-31 17:11:59 (GMT)
commit491c0e523429f45c02f5da04f8b7fbb45095e1e1 (patch)
tree78f86d25ea628dc6fe6ad394053610a6e6e3420d /src/WorkspaceCmd.cc
parent8f8d8bd0f1ab31eb68d6baf42254b01b1d240510 (diff)
downloadfluxbox-491c0e523429f45c02f5da04f8b7fbb45095e1e1.zip
fluxbox-491c0e523429f45c02f5da04f8b7fbb45095e1e1.tar.bz2
pattern matching for window commands and [group] in apps file
Diffstat (limited to 'src/WorkspaceCmd.cc')
-rw-r--r--src/WorkspaceCmd.cc32
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
44void 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
44void NextWindowCmd::execute() { 63void 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
269void 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
282void CloseAllWindowsCmd::execute() { 288void CloseAllWindowsCmd::execute() {
283 BScreen *screen = Fluxbox::instance()->mouseScreen(); 289 BScreen *screen = Fluxbox::instance()->mouseScreen();
284 if (screen == 0) 290 if (screen == 0)