add feature to minimize windows in current layer

This commit is contained in:
markt 2007-01-11 19:22:46 +00:00
parent 45743c6f42
commit 9cace1f2cb
4 changed files with 30 additions and 3 deletions

View file

@ -1,5 +1,9 @@
(Format: Year/Month/Day)
Changes for 1.0rc3:
*07/01/11:
* Added option to :Minimize key command to lower all windows in the same
layer as the focused window -- syntax is `:Minimize (layer)' (Mark)
FbCommandFactory.cc WorkspaceCmd.cc/hh
*07/01/08:
* Fix another 64-bit window property (Mark/Simon)
FbTk/FbWindow.cc

View file

@ -233,9 +233,15 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command,
//
else if (command == "fullscreen")
return new FullscreenCmd();
else if (command == "minimizewindow" || command == "minimize" || command == "iconify")
else if (command == "minimizewindow" || command == "minimize" || command == "iconify") {
string cmd;
if (FbTk::StringUtil::getStringBetween(cmd, arguments.c_str() +
0, '(', ')', " \t\n", true)
&& cmd == "layer")
return new MinimizeLayerCmd();
else
return new CurrentWindowCmd(&FluxboxWindow::iconify);
else if (command == "maximizewindow" || command == "maximize")
} else if (command == "maximizewindow" || command == "maximize")
return new CurrentWindowCmd(&FluxboxWindow::maximizeFull);
else if (command == "maximizevertical")
return new CurrentWindowCmd(&FluxboxWindow::maximizeVertical);

View file

@ -255,6 +255,19 @@ void ShowDesktopCmd::execute() {
std::mem_fun(&FluxboxWindow::iconify));
}
void MinimizeLayerCmd::execute() {
FluxboxWindow *win = FocusControl::focusedFbWindow();
if (!win)
return;
Workspace::Windows windows(win->screen().currentWorkspace()->windowList());
Workspace::Windows::iterator it = windows.begin(), it_end = windows.end();
for (; it != it_end; ++it) {
if (win->layerNum() == (*it)->layerNum())
(*it)->iconify();
}
}
void CloseAllWindowsCmd::execute() {
BScreen *screen = Fluxbox::instance()->mouseScreen();
if (screen == 0)

View file

@ -104,6 +104,10 @@ public:
void execute();
};
class MinimizeLayerCmd: public FbTk::Command {
public:
void execute();
};
class CloseAllWindowsCmd: public FbTk::Command {
public: