summaryrefslogtreecommitdiff
path: root/src/actions.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-12-18 16:07:44 +0000
committerDana Jansens <danakj@orodu.net>2002-12-18 16:07:44 +0000
commit732bfd191dbf1f5cf3473a794f9a736dcba6117e (patch)
treeb59f4adfe447b2c3eb5d399b66efc0f211bab76f /src/actions.cc
parentf4e2fc32743309dae8663f9e47a4e2f4d941d1b5 (diff)
you can move windows!
Diffstat (limited to 'src/actions.cc')
-rw-r--r--src/actions.cc7
1 files changed, 7 insertions, 0 deletions
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 <stdio.h>
@@ -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);
+ }
}