X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Faction.c;h=b05e34504ec82af9914cb94c59537cb30f5e8deb;hb=4f427471b862f2f547981878b1d088ac52929936;hp=dfcd8d7e0634edf8ddb500fee7d4934eece1fe3b;hpb=597fad9d8d5b7be27cabeeec750ed15f86377a07;p=chaz%2Fopenbox diff --git a/openbox/action.c b/openbox/action.c index dfcd8d7e..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); @@ -51,6 +52,12 @@ void action_iconify(union ActionData *data) client_iconify(data->client.c, TRUE, TRUE); } +void action_focusraise(union ActionData *data) +{ + client_focus(data->client.c); + stacking_raise(data->client.c); +} + void action_raise(union ActionData *data) { stacking_raise(data->client.c); @@ -395,6 +402,9 @@ void action_move(union ActionData *data) int x = data->move.x; int y = data->move.y; + 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); } @@ -405,6 +415,8 @@ void action_resize(union ActionData *data) 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; + /* XXX window snapping/struts */ + client_configure(c, data->resize.corner, c->area.x, c->area.y, w, h, TRUE, data->resize.final); }