]> Dogcows Code - chaz/openbox/blobdiff - openbox/action.c
make history placement optional
[chaz/openbox] / openbox / action.c
index 009851411fb4a99e2d04c7c04edb074a049bfc48..3e463d668732643037b45ff89aa131e3ecd4e4a5 100644 (file)
@@ -3,6 +3,7 @@
 #include "frame.h"
 #include "screen.h"
 #include "action.h"
+#include "dispatch.h"
 
 #include <glib.h>
 
@@ -29,7 +30,7 @@ void action_free(Action *a)
 
 void action_execute(union ActionData *data)
 {
-    GError *e;
+    GError *e = NULL;
     if (!g_spawn_command_line_async(data->execute.path, &e)) {
         g_warning("failed to execute '%s': %s",
                   data->execute.path, e->message);
@@ -72,6 +73,11 @@ void action_close(union ActionData *data)
     client_close(data->client.c);
 }
 
+void action_kill(union ActionData *data)
+{
+    client_kill(data->client.c);
+}
+
 void action_shade(union ActionData *data)
 {
     client_shade(data->client.c, TRUE);
@@ -401,8 +407,9 @@ void action_move(union ActionData *data)
     int x = data->move.x;
     int y = data->move.y;
 
-    /* XXX window snapping/struts */
+    dispatch_move(c, &x, &y);
 
+    frame_frame_gravity(c->frame, &x, &y); /* get where the client should be */
     client_configure(c, Corner_TopLeft, x, y, c->area.width, c->area.height,
                      TRUE, data->move.final);
 }
This page took 0.027098 seconds and 4 git commands to generate.