- GError *e = NULL;
- char *cmd;
- if (data->execute.path) {
- cmd = g_filename_from_utf8(data->execute.path, -1, NULL, NULL, NULL);
- if (cmd) {
- if (!g_spawn_command_line_async(cmd, &e)) {
- g_warning("failed to execute '%s': %s",
- cmd, e->message);
- }
- } else {
- g_warning("failed to convert '%s' from utf8", data->execute.path);
- }
- }
-}
-
-void action_focus(union ActionData *data)
-{
- if (data->client.c)
- client_focus(data->client.c);
-}
-
-void action_unfocus (union ActionData *data)
-{
- if (data->client.c)
- client_unfocus(data->client.c);
-}
-
-void action_iconify(union ActionData *data)
-{
- if (data->client.c)
- client_iconify(data->client.c, TRUE, TRUE);
-}
-
-void action_raise(union ActionData *data)
-{
- if (data->client.c)
- stacking_raise(CLIENT_AS_WINDOW(data->client.c));
-}
-
-void action_unshaderaise(union ActionData *data)
-{
- if (data->client.c) {
- if (data->client.c->shaded)
- client_shade(data->client.c, FALSE);
- else
- stacking_raise(CLIENT_AS_WINDOW(data->client.c));
- }
-}
-
-void action_shadelower(union ActionData *data)
-{
- if (data->client.c) {
- if (data->client.c->shaded)
- stacking_lower(CLIENT_AS_WINDOW(data->client.c));
- else
- client_shade(data->client.c, TRUE);
- }
-}
-
-void action_lower(union ActionData *data)
-{
- if (data->client.c)
- stacking_lower(CLIENT_AS_WINDOW(data->client.c));
-}
-
-void action_close(union ActionData *data)
-{
- if (data->client.c)
- client_close(data->client.c);
-}
-
-void action_kill(union ActionData *data)
-{
- if (data->client.c)
- client_kill(data->client.c);
-}
-
-void action_shade(union ActionData *data)
-{
- if (data->client.c)
- client_shade(data->client.c, TRUE);
-}
-
-void action_unshade(union ActionData *data)
-{
- if (data->client.c)
- client_shade(data->client.c, FALSE);
-}
-
-void action_toggle_shade(union ActionData *data)
-{
- if (data->client.c)
- client_shade(data->client.c, !data->client.c->shaded);
-}
-
-void action_toggle_omnipresent(union ActionData *data)
-{
- if (data->client.c)
- client_set_desktop(data->client.c,
- data->client.c->desktop == DESKTOP_ALL ?
- screen_desktop : DESKTOP_ALL, FALSE);
-}
-
-void action_move_relative_horz(union ActionData *data)
-{
- ObClient *c = data->relative.c;
- if (c)
- client_configure(c, OB_CORNER_TOPLEFT,
- c->area.x + data->relative.delta, c->area.y,
- c->area.width, c->area.height, TRUE, TRUE);
-}
-
-void action_move_relative_vert(union ActionData *data)
-{
- ObClient *c = data->relative.c;
- if (c)
- client_configure(c, OB_CORNER_TOPLEFT,
- c->area.x, c->area.y + data->relative.delta,
- c->area.width, c->area.height, TRUE, TRUE);
-}