diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-03-28 09:33:40 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-03-28 09:33:40 +0000 |
| commit | ca40e8b9eca2bba3d4aadd650722bc80542b4819 (patch) | |
| tree | 92bd28d81ebcda7879cf9760f17e7626fead0701 /openbox/dispatch.c | |
| parent | 1cbe8af5e32984da6a5a11a2e7aecf8d069921cf (diff) | |
add resizing event
Diffstat (limited to 'openbox/dispatch.c')
| -rw-r--r-- | openbox/dispatch.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/openbox/dispatch.c b/openbox/dispatch.c index 08690a37..6f2b3d4e 100644 --- a/openbox/dispatch.c +++ b/openbox/dispatch.c @@ -153,6 +153,7 @@ void dispatch_client(EventType e, Client *c, int num0, int num1) obe.data.c.client = c; obe.data.c.num[0] = num0; obe.data.c.num[1] = num1; + obe.data.c.num[2] = 0; i = 0; while (e > 1) { @@ -213,8 +214,8 @@ void dispatch_signal(int signal) void dispatch_move(Client *c, int *x, int *y) { guint i; - EventType e = Event_Client_Moving; GSList *it; + EventType e = Event_Client_Moving; ObEvent obe; obe.type = e; @@ -236,3 +237,31 @@ void dispatch_move(Client *c, int *x, int *y) *x = obe.data.c.num[0]; *y = obe.data.c.num[1]; } + +void dispatch_resize(Client *c, int *w, int *h, Corner corner) +{ + guint i; + GSList *it; + EventType e = Event_Client_Resizing; + ObEvent obe; + + obe.type = e; + obe.data.c.client = c; + obe.data.c.num[0] = *w; + obe.data.c.num[1] = *h; + obe.data.c.num[2] = corner; + + 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); + } + + *w = obe.data.c.num[0]; + *h = obe.data.c.num[1]; +} |
