]> Dogcows Code - chaz/openbox/blobdiff - openbox/dispatch.c
prefixing and capitalizing the StackLayer -> ObStackingLayer enum.
[chaz/openbox] / openbox / dispatch.c
index 08690a3715c9e74e8ed1842400f2572f3eab4817..291e9580803c878603585d8921b670d86b67dba8 100644 (file)
@@ -1,5 +1,6 @@
 #include "dispatch.h"
 #include "extensions.h"
+#include "client.h"
 
 #include <glib.h>
 
@@ -84,7 +85,7 @@ void dispatch_register(EventMask mask, EventHandler h, void *data)
     }
 }
 
-void dispatch_x(XEvent *xe, Client *c)
+void dispatch_x(XEvent *xe, ObClient *c)
 {
     EventType e;
     guint i;
@@ -141,7 +142,7 @@ void dispatch_x(XEvent *xe, Client *c)
     }
 }
 
-void dispatch_client(EventType e, Client *c, int num0, int num1)
+void dispatch_client(EventType e, ObClient *c, int num0, int num1)
 {
     guint i;
     GSList *it;
@@ -153,6 +154,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) {
@@ -210,11 +212,11 @@ void dispatch_signal(int signal)
     }
 }
 
-void dispatch_move(Client *c, int *x, int *y)
+void dispatch_move(ObClient *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 +238,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(ObClient *c, int *w, int *h, ObCorner 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];
+}
This page took 0.028749 seconds and 4 git commands to generate.