From: Dana Jansens Date: Wed, 19 Mar 2003 19:22:13 +0000 (+0000) Subject: snap windows when moving them X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=e442c6cc56813ac2d80ddf956603b6d0123d8145;p=chaz%2Fopenbox snap windows when moving them --- diff --git a/openbox/action.c b/openbox/action.c index 00985141..f3ee6be5 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 @@ -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); }