X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Faction.c;h=cf2c03079e9d715f94bc2945941950a31ffbad8a;hb=7bb829f8b721b8b5a75740b2686fa12f63a798ff;hp=009851411fb4a99e2d04c7c04edb074a049bfc48;hpb=75ee81d9bf47739b4a8f092d3247465c45684e77;p=chaz%2Fopenbox diff --git a/openbox/action.c b/openbox/action.c index 00985141..cf2c0307 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -3,6 +3,8 @@ #include "frame.h" #include "screen.h" #include "action.h" +#include "dispatch.h" +#include "openbox.h" #include @@ -29,7 +31,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 +74,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 +408,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); } @@ -418,3 +426,14 @@ void action_resize(union ActionData *data) 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; +}