+
+void action_movetoedge(union ActionData *data)
+{
+ int x, y, h, w;
+ Client *c = data->diraction.c;
+
+ if (!c)
+ return;
+ x = c->frame->area.x;
+ y = c->frame->area.y;
+
+ h = screen_area(c->desktop)->height;
+ w = screen_area(c->desktop)->width;
+ switch(data->diraction.direction) {
+ case Direction_North:
+ y = 0;
+ break;
+ case Direction_West:
+ x = 0;
+ break;
+ case Direction_South:
+ y = h - c->frame->area.height;
+ break;
+ case Direction_East:
+ x = w - c->frame->area.width;
+ break;
+ }
+ frame_frame_gravity(c->frame, &x, &y);
+ client_configure(c, Corner_TopLeft,
+ x, y, c->area.width, c->area.height, TRUE, TRUE);
+
+}
+
+void action_send_to_layer(union ActionData *data)
+{
+ if (data->layer.c)
+ client_set_layer(data->layer.c, data->layer.layer);
+}
+
+void action_toggle_layer(union ActionData *data)
+{
+ Client *c = data->layer.c;
+
+ if (c) {
+ if (data->layer.layer < 0)
+ client_set_layer(c, c->below ? 0 : -1);
+ else if (data->layer.layer > 0)
+ client_set_layer(c, c->above ? 0 : 1);
+ }
+}