]> Dogcows Code - chaz/openbox/commitdiff
snap windows when moving them
authorDana Jansens <danakj@orodu.net>
Wed, 19 Mar 2003 19:22:13 +0000 (19:22 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 19 Mar 2003 19:22:13 +0000 (19:22 +0000)
openbox/action.c

index 009851411fb4a99e2d04c7c04edb074a049bfc48..f3ee6be5643243aa119a2bb278bace1c788faf7a 100644 (file)
@@ -3,6 +3,7 @@
 #include "frame.h"
 #include "screen.h"
 #include "action.h"
+#include "snap.h"
 
 #include <glib.h>
 
@@ -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);
 }
This page took 0.023972 seconds and 4 git commands to generate.