summaryrefslogtreecommitdiffstats
path: root/cmd-if-shell.c
diff options
context:
space:
mode:
authornicm <nicm>2020-04-13 14:46:04 +0000
committernicm <nicm>2020-04-13 14:46:04 +0000
commitadb76fd1ce8753a958d4ffe14db724f9f4d674ea (patch)
tree7d724330c7347975fa1546b99b55a145ee5f2be3 /cmd-if-shell.c
parent9a65102bfc2ed5d1e1f41e47451b8296c84f133d (diff)
Move cmdq_state into cmd-queue.c.
Diffstat (limited to 'cmd-if-shell.c')
-rw-r--r--cmd-if-shell.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/cmd-if-shell.c b/cmd-if-shell.c
index 4210392e..3657c730 100644
--- a/cmd-if-shell.c
+++ b/cmd-if-shell.c
@@ -56,16 +56,15 @@ struct cmd_if_shell_data {
struct client *client;
struct cmdq_item *item;
- struct mouse_event mouse;
+ struct key_event event;
};
static enum cmd_retval
cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item)
{
struct args *args = cmd_get_args(self);
- struct cmdq_state *state = cmdq_get_state(item);
struct cmd_find_state *target = cmdq_get_target(item);
- struct mouse_event *m = &state->event.m;
+ struct key_event *event = cmdq_get_event(item);
struct cmd_if_shell_data *cdata;
char *shellcmd, *cmd;
const char *file;
@@ -102,7 +101,8 @@ cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item)
free(pr->error);
return (CMD_RETURN_ERROR);
case CMD_PARSE_SUCCESS:
- new_item = cmdq_get_command(pr->cmdlist, target, m, 0);
+ new_item = cmdq_get_command(pr->cmdlist, target, event,
+ 0);
cmdq_insert_after(item, new_item);
cmd_list_free(pr->cmdlist);
break;
@@ -117,7 +117,7 @@ cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item)
cdata->cmd_else = xstrdup(args->argv[2]);
else
cdata->cmd_else = NULL;
- memcpy(&cdata->mouse, m, sizeof cdata->mouse);
+ memcpy(&cdata->event, event, sizeof cdata->event);
if (!args_has(args, 'b'))
cdata->client = cmdq_get_client(item);
@@ -161,7 +161,7 @@ cmd_if_shell_callback(struct job *job)
{
struct cmd_if_shell_data *cdata = job_get_data(job);
struct client *c = cdata->client;
- struct mouse_event *m = &cdata->mouse;
+ struct key_event *event = &cdata->event;
struct cmdq_item *new_item = NULL;
char *cmd;
int status;
@@ -185,7 +185,7 @@ cmd_if_shell_callback(struct job *job)
free(pr->error);
break;
case CMD_PARSE_SUCCESS:
- new_item = cmdq_get_command(pr->cmdlist, NULL, m, 0);
+ new_item = cmdq_get_command(pr->cmdlist, NULL, event, 0);
cmd_list_free(pr->cmdlist);
break;
}