]> Dogcows Code - chaz/openbox/blobdiff - openbox/action.c
add new parsing shit
[chaz/openbox] / openbox / action.c
index 3e463d668732643037b45ff89aa131e3ecd4e4a5..e6f6a9320acc069672e57b5e1971f812653f0cc8 100644 (file)
@@ -4,6 +4,7 @@
 #include "screen.h"
 #include "action.h"
 #include "dispatch.h"
+#include "openbox.h"
 
 #include <glib.h>
 
@@ -22,7 +23,7 @@ Action *action_new(void (*func)(union ActionData *data))
 void action_free(Action *a)
 {
     /* deal with pointers */
-    if (a->func == action_execute)
+    if (a->func == action_execute || a->func == action_restart)
         g_free(a->data.execute.path);
 
     g_free(a);
@@ -407,6 +408,8 @@ void action_move(union ActionData *data)
     int x = data->move.x;
     int y = data->move.y;
 
+    if (!client_normal(c)) return;
+
     dispatch_move(c, &x, &y);
 
     frame_frame_gravity(c->frame, &x, &y); /* get where the client should be */
@@ -419,9 +422,22 @@ void action_resize(union ActionData *data)
     Client *c = data->resize.c;
     int w = data->resize.x - c->frame->size.left - c->frame->size.right;
     int h = data->resize.y - c->frame->size.top - c->frame->size.bottom;
+    if (!client_normal(c)) return;
 
     /* XXX window snapping/struts */
 
     client_configure(c, data->resize.corner, c->area.x, c->area.y, w, h,
                      TRUE, data->resize.final);
 }
+
+void action_restart(union ActionData *data)
+{
+    ob_restart_path = data->execute.path;
+    ob_shutdown = ob_restart = TRUE;
+}
+
+void action_exit(union ActionData *data)
+{
+    ob_shutdown = TRUE;
+}
This page took 0.020798 seconds and 4 git commands to generate.