aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/CurrentWindowCmd.cc5
-rw-r--r--src/CurrentWindowCmd.hh7
-rw-r--r--src/FbCommandFactory.cc3
3 files changed, 15 insertions, 0 deletions
diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc
index 4c77eac..ba3af0d 100644
--- a/src/CurrentWindowCmd.cc
+++ b/src/CurrentWindowCmd.cc
@@ -129,3 +129,8 @@ void ResizeToCmd::real_execute() {
129 if (m_step_size_x > 0 && m_step_size_y > 0) 129 if (m_step_size_x > 0 && m_step_size_y > 0)
130 fbwindow().resize(m_step_size_x, m_step_size_y); 130 fbwindow().resize(m_step_size_x, m_step_size_y);
131} 131}
132
133FullscreenCmd::FullscreenCmd() { }
134void FullscreenCmd::real_execute() {
135 fbwindow().setFullscreen(!fbwindow().isFullscreen());
136}
diff --git a/src/CurrentWindowCmd.hh b/src/CurrentWindowCmd.hh
index 2192cc2..6e17566 100644
--- a/src/CurrentWindowCmd.hh
+++ b/src/CurrentWindowCmd.hh
@@ -154,4 +154,11 @@ private:
154 const int m_step_size_x; 154 const int m_step_size_x;
155 const int m_step_size_y; 155 const int m_step_size_y;
156}; 156};
157
158class FullscreenCmd: public WindowHelperCmd{
159public:
160 explicit FullscreenCmd();
161protected:
162 void real_execute();
163};
157#endif // CURRENTWINDOWCMD_HH 164#endif // CURRENTWINDOWCMD_HH
diff --git a/src/FbCommandFactory.cc b/src/FbCommandFactory.cc
index 86f9eff..8279edb 100644
--- a/src/FbCommandFactory.cc
+++ b/src/FbCommandFactory.cc
@@ -63,6 +63,7 @@ FbCommandFactory::FbCommandFactory() {
63 "focusdown", 63 "focusdown",
64 "focusleft", 64 "focusleft",
65 "focusright", 65 "focusright",
66 "fullscreen",
66 "iconify", 67 "iconify",
67 "killwindow", 68 "killwindow",
68 "leftworkspace", 69 "leftworkspace",
@@ -208,6 +209,8 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command,
208 // 209 //
209 // Current focused window commands 210 // Current focused window commands
210 // 211 //
212 else if (command == "fullscreen")
213 return new FullscreenCmd();
211 else if (command == "minimizewindow" || command == "minimize" || command == "iconify") 214 else if (command == "minimizewindow" || command == "minimize" || command == "iconify")
212 return new CurrentWindowCmd(&FluxboxWindow::iconify); 215 return new CurrentWindowCmd(&FluxboxWindow::iconify);
213 else if (command == "maximizewindow" || command == "maximize") 216 else if (command == "maximizewindow" || command == "maximize")