diff options
author | nicm <nicm> | 2017-04-21 20:34:05 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-04-21 20:34:05 +0000 |
commit | c68ceca8cd4294c2b9991aa1884d58258596868f (patch) | |
tree | 0807bfcf27156a0b52bb6fe6d2d2ddd980ca3904 /cmd-queue.c | |
parent | efaf4c16cf9fafa940dfe16ec48ca4ff68082b47 (diff) | |
download | rtmux-c68ceca8cd4294c2b9991aa1884d58258596868f.tar.gz rtmux-c68ceca8cd4294c2b9991aa1884d58258596868f.tar.bz2 rtmux-c68ceca8cd4294c2b9991aa1884d58258596868f.zip |
Clear shared state if not filling it in.
Diffstat (limited to 'cmd-queue.c')
-rw-r--r-- | cmd-queue.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd-queue.c b/cmd-queue.c index 6607fc04..a7a29b58 100644 --- a/cmd-queue.c +++ b/cmd-queue.c @@ -158,6 +158,8 @@ cmdq_get_command(struct cmd_list *cmdlist, struct cmd_find_state *current, shared = xcalloc(1, sizeof *shared); if (current != NULL) cmd_find_copy_state(&shared->current, current); + else + cmd_find_clear_state(&shared->current, 0); if (m != NULL) memcpy(&shared->mouse, m, sizeof shared->mouse); @@ -205,6 +207,7 @@ cmdq_fire_command(struct cmdq_item *item) retval = CMD_RETURN_ERROR; goto out; } + if (item->client == NULL) item->client = cmd_find_client(item, NULL, 1); |