#include "frame.h"
#include "screen.h"
#include "action.h"
-#include "snap.h"
+#include "dispatch.h"
+#include "openbox.h"
#include <glib.h>
void action_free(Action *a)
{
/* deal with pointers */
- if (a->func == action_execute)
+ if (a->func == action_execute || a->func == action_restart)
g_free(a->data.execute.path);
g_free(a);
client_close(data->client.c);
}
+void action_kill(union ActionData *data)
+{
+ client_kill(data->client.c);
+}
+
void action_shade(union ActionData *data)
{
client_shade(data->client.c, TRUE);
int x = data->move.x;
int y = data->move.y;
- snap_move(c, &x, &y, c->frame->area.width, c->frame->area.height);
+ if (!client_normal(c)) return;
+
+ dispatch_move(c, &x, &y);
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,
Client *c = data->resize.c;
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;
+
+ if (!client_normal(c)) return;
/* XXX window snapping/struts */
client_configure(c, data->resize.corner, c->area.x, c->area.y, w, h,
TRUE, data->resize.final);
}
+
+void action_restart(union ActionData *data)
+{
+ ob_restart_path = data->execute.path;
+ ob_shutdown = ob_restart = TRUE;
+}
+
+void action_exit(union ActionData *data)
+{
+ ob_shutdown = TRUE;
+}