From 12dff3d3a9cc6ed88493f39b07c9bcc1132f95e7 Mon Sep 17 00:00:00 2001 From: mathias Date: Wed, 23 Mar 2005 20:36:12 +0000 Subject: added "Fullscreen" - command, removes borders and maximizes to the full screen ... hence the name :) --- src/CurrentWindowCmd.cc | 5 +++++ src/CurrentWindowCmd.hh | 7 +++++++ src/FbCommandFactory.cc | 3 +++ 3 files changed, 15 insertions(+) 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() { if (m_step_size_x > 0 && m_step_size_y > 0) fbwindow().resize(m_step_size_x, m_step_size_y); } + +FullscreenCmd::FullscreenCmd() { } +void FullscreenCmd::real_execute() { + fbwindow().setFullscreen(!fbwindow().isFullscreen()); +} 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: const int m_step_size_x; const int m_step_size_y; }; + +class FullscreenCmd: public WindowHelperCmd{ +public: + explicit FullscreenCmd(); +protected: + void real_execute(); +}; #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() { "focusdown", "focusleft", "focusright", + "fullscreen", "iconify", "killwindow", "leftworkspace", @@ -208,6 +209,8 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command, // // Current focused window commands // + else if (command == "fullscreen") + return new FullscreenCmd(); else if (command == "minimizewindow" || command == "minimize" || command == "iconify") return new CurrentWindowCmd(&FluxboxWindow::iconify); else if (command == "maximizewindow" || command == "maximize") -- cgit v0.11.2