all repos — fluxbox @ 5749014fa76f6019d0507776bcadec12bae54635

custom fork of the fluxbox windowmanager

added resizehorizontal and resizevertical, patch from Mathias Gumz
fluxgen fluxgen
commit

5749014fa76f6019d0507776bcadec12bae54635

parent

6d1ac53b5f99c098b149e472143d46df68378347

3 files changed, 35 insertions(+), 4 deletions(-)

jump to
M src/CurrentWindowCmd.ccsrc/CurrentWindowCmd.cc

@@ -20,7 +20,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: CurrentWindowCmd.cc,v 1.3 2003/07/28 15:06:33 rathnor Exp $ +// $Id: CurrentWindowCmd.cc,v 1.4 2003/08/19 23:37:31 fluxgen Exp $ #include "CurrentWindowCmd.hh"

@@ -85,3 +85,13 @@ void MoveUpCmd::real_execute() {

fbwindow().move(fbwindow().x(), fbwindow().y() - stepSize()); } +ResizeHorizontalCmd::ResizeHorizontalCmd(int step_size):MoveHelper(step_size) { } +void ResizeHorizontalCmd::real_execute() { + fbwindow().resize(fbwindow().width() + stepSize() * fbwindow().winClient().width_inc, fbwindow().height()); +} + +ResizeVerticalCmd::ResizeVerticalCmd(int step_size):MoveHelper(step_size) { } +void ResizeVerticalCmd::real_execute() { + fbwindow().resize(fbwindow().width(), fbwindow().height() + stepSize() * fbwindow().winClient().height_inc); +} +
M src/CurrentWindowCmd.hhsrc/CurrentWindowCmd.hh

@@ -20,7 +20,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: CurrentWindowCmd.hh,v 1.2 2003/07/28 15:06:33 rathnor Exp $ +// $Id: CurrentWindowCmd.hh,v 1.3 2003/08/19 23:37:31 fluxgen Exp $ #ifndef CURRENTWINDOWCMD_HH #define CURRENTWINDOWCMD_HH

@@ -110,4 +110,19 @@ protected:

void real_execute(); }; +// resize vertical +class ResizeVerticalCmd: public MoveHelper { +public: + explicit ResizeVerticalCmd(int step_size); +protected: + void real_execute(); +}; + +// resize horizontal +class ResizeHorizontalCmd: public MoveHelper{ +public: + explicit ResizeHorizontalCmd(int step_size); +protected: + void real_execute(); +}; #endif // CURRENTWINDOWCMD_HH
M src/FbCommandFactory.ccsrc/FbCommandFactory.cc

@@ -20,7 +20,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbCommandFactory.cc,v 1.11 2003/07/28 12:05:27 fluxgen Exp $ +// $Id: FbCommandFactory.cc,v 1.12 2003/08/19 23:37:31 fluxgen Exp $ #include "FbCommandFactory.hh"

@@ -38,7 +38,7 @@

FbCommandFactory::FbCommandFactory() { // setup commands that we can handle - const char commands[][30] = { + const char commands[][32] = { "setstyle", "saverc", "reconfigure",

@@ -54,6 +54,8 @@ "maximizewindow",

"maximize", "maximizevertical", "maximizehorizontal", + "resizevertical", + "resizehorizontal", "moveright", "moveleft", "moveup",

@@ -125,6 +127,10 @@ else if (command == "maximizevertical")

return new CurrentWindowCmd(&FluxboxWindow::maximizeVertical); else if (command == "maximizehorizontal") return new CurrentWindowCmd(&FluxboxWindow::maximizeHorizontal); + else if (command == "resizehorizontal") + return new ResizeHorizontalCmd(atoi(arguments.c_str())); + else if (command == "resizevertical") + return new ResizeVerticalCmd(atoi(arguments.c_str())); else if (command == "moveright") return new MoveRightCmd(atoi(arguments.c_str())); else if (command == "moveleft")