summaryrefslogtreecommitdiff
path: root/openbox/dispatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbox/dispatch.c')
-rw-r--r--openbox/dispatch.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/openbox/dispatch.c b/openbox/dispatch.c
index 059f163b..d6f91a2f 100644
--- a/openbox/dispatch.c
+++ b/openbox/dispatch.c
@@ -212,3 +212,30 @@ void dispatch_signal(int signal)
f->h(&obe, f->data);
}
}
+
+void dispatch_move(Client *c, int *x, int *y)
+{
+ guint i;
+ EventType e = Event_Client_Moving;
+ GSList *it;
+ ObEvent obe;
+
+ obe.type = e;
+ obe.data.c.client = c;
+ obe.data.c.num[0] = *x;
+ obe.data.c.num[1] = *y;
+
+ i = 0;
+ while (e > 1) {
+ e >>= 1;
+ ++i;
+ }
+
+ for (it = funcs[i]; it != NULL; it = it->next) {
+ Func *f = it->data;
+ f->h(&obe, f->data);
+ }
+
+ *x = obe.data.c.num[0];
+ *y = obe.data.c.num[1];
+}