aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--src/FbCommandFactory.cc12
-rw-r--r--src/WorkspaceCmd.cc13
-rw-r--r--src/WorkspaceCmd.hh4
4 files changed, 30 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 3c6160e..d1a6732 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
1 (Format: Year/Month/Day) 1 (Format: Year/Month/Day)
2Changes for 1.0rc3: 2Changes for 1.0rc3:
3*07/01/11:
4 * Added option to :Minimize key command to lower all windows in the same
5 layer as the focused window -- syntax is `:Minimize (layer)' (Mark)
6 FbCommandFactory.cc WorkspaceCmd.cc/hh
3*07/01/08: 7*07/01/08:
4 * Fix another 64-bit window property (Mark/Simon) 8 * Fix another 64-bit window property (Mark/Simon)
5 FbTk/FbWindow.cc 9 FbTk/FbWindow.cc
diff --git a/src/FbCommandFactory.cc b/src/FbCommandFactory.cc
index 6fe5e11..ece8c9e 100644
--- a/src/FbCommandFactory.cc
+++ b/src/FbCommandFactory.cc
@@ -233,9 +233,15 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command,
233 // 233 //
234 else if (command == "fullscreen") 234 else if (command == "fullscreen")
235 return new FullscreenCmd(); 235 return new FullscreenCmd();
236 else if (command == "minimizewindow" || command == "minimize" || command == "iconify") 236 else if (command == "minimizewindow" || command == "minimize" || command == "iconify") {
237 return new CurrentWindowCmd(&FluxboxWindow::iconify); 237 string cmd;
238 else if (command == "maximizewindow" || command == "maximize") 238 if (FbTk::StringUtil::getStringBetween(cmd, arguments.c_str() +
239 0, '(', ')', " \t\n", true)
240 && cmd == "layer")
241 return new MinimizeLayerCmd();
242 else
243 return new CurrentWindowCmd(&FluxboxWindow::iconify);
244 } else if (command == "maximizewindow" || command == "maximize")
239 return new CurrentWindowCmd(&FluxboxWindow::maximizeFull); 245 return new CurrentWindowCmd(&FluxboxWindow::maximizeFull);
240 else if (command == "maximizevertical") 246 else if (command == "maximizevertical")
241 return new CurrentWindowCmd(&FluxboxWindow::maximizeVertical); 247 return new CurrentWindowCmd(&FluxboxWindow::maximizeVertical);
diff --git a/src/WorkspaceCmd.cc b/src/WorkspaceCmd.cc
index 204d1b9..6c97808 100644
--- a/src/WorkspaceCmd.cc
+++ b/src/WorkspaceCmd.cc
@@ -255,6 +255,19 @@ void ShowDesktopCmd::execute() {
255 std::mem_fun(&FluxboxWindow::iconify)); 255 std::mem_fun(&FluxboxWindow::iconify));
256} 256}
257 257
258void MinimizeLayerCmd::execute() {
259 FluxboxWindow *win = FocusControl::focusedFbWindow();
260 if (!win)
261 return;
262
263 Workspace::Windows windows(win->screen().currentWorkspace()->windowList());
264 Workspace::Windows::iterator it = windows.begin(), it_end = windows.end();
265 for (; it != it_end; ++it) {
266 if (win->layerNum() == (*it)->layerNum())
267 (*it)->iconify();
268 }
269}
270
258void CloseAllWindowsCmd::execute() { 271void CloseAllWindowsCmd::execute() {
259 BScreen *screen = Fluxbox::instance()->mouseScreen(); 272 BScreen *screen = Fluxbox::instance()->mouseScreen();
260 if (screen == 0) 273 if (screen == 0)
diff --git a/src/WorkspaceCmd.hh b/src/WorkspaceCmd.hh
index 1e5b04d..7d8d9e6 100644
--- a/src/WorkspaceCmd.hh
+++ b/src/WorkspaceCmd.hh
@@ -104,6 +104,10 @@ public:
104 void execute(); 104 void execute();
105}; 105};
106 106
107class MinimizeLayerCmd: public FbTk::Command {
108public:
109 void execute();
110};
107 111
108class CloseAllWindowsCmd: public FbTk::Command { 112class CloseAllWindowsCmd: public FbTk::Command {
109public: 113public: