From 732bfd191dbf1f5cf3473a794f9a736dcba6117e Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 18 Dec 2002 16:07:44 +0000 Subject: you can move windows! --- src/actions.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/actions.cc') diff --git a/src/actions.cc b/src/actions.cc index 9660937d..2c527b79 100644 --- a/src/actions.cc +++ b/src/actions.cc @@ -7,6 +7,7 @@ #include "actions.hh" #include "widget.hh" #include "openbox.hh" +#include "client.hh" #include "otk/display.hh" #include @@ -177,6 +178,12 @@ void OBActions::motionHandler(const XMotionEvent &e) // XXX: i can envision all sorts of crazy shit with this.. gestures, etc printf("GUILE: MOTION: win %lx type %d modifiers %u x %d y %d\n", (long)e.window, (w ? w->type():-1), e.state, _dx, _dy); + + if (w && (w->type() == OBWidget::Type_Titlebar || + w->type() == OBWidget::Type_Label)) { + OBClient *c = Openbox::instance->findClient(e.window); + if (c) c->move(c->area().x() + _dx, c->area().y() + _dy); + } } -- cgit v1.2.3