X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Faction.c;h=b05e34504ec82af9914cb94c59537cb30f5e8deb;hb=a648c05a7a2608e7e909317f5afe8427a0ea0d68;hp=009851411fb4a99e2d04c7c04edb074a049bfc48;hpb=75ee81d9bf47739b4a8f092d3247465c45684e77;p=chaz%2Fopenbox diff --git a/openbox/action.c b/openbox/action.c index 00985141..b05e3450 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -3,6 +3,7 @@ #include "frame.h" #include "screen.h" #include "action.h" +#include "snap.h" #include @@ -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); @@ -401,8 +402,9 @@ void action_move(union ActionData *data) int x = data->move.x; int y = data->move.y; - /* XXX window snapping/struts */ + snap_move(c, &x, &y, c->frame->area.width, c->frame->area.height); + 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); }