aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-22 14:10:40 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-23 08:24:32 +1000
commit81e8f31cc6f284b54ab206e14af7ecbc1a9ed1bb (patch)
treeea124a94869d06edb3f98e85ecd649275e86ef91 /sway/commands.c
parentMerge pull request #2328 from emersion/xdg-shell-set-title (diff)
downloadsway-81e8f31cc6f284b54ab206e14af7ecbc1a9ed1bb.tar.gz
sway-81e8f31cc6f284b54ab206e14af7ecbc1a9ed1bb.tar.zst
sway-81e8f31cc6f284b54ab206e14af7ecbc1a9ed1bb.zip
Implement scratchpad
Implements the following commands: * move scratchpad * scratchpad show * [criteria] scratchpad show Also fixes these: * Fix memory leak when executing command with criteria (use `list_free(views)` instead of `free(views)`) * Fix crash when running `move to` with no further arguments
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/commands.c b/sway/commands.c
index f40f0e9d..fdae1961 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -149,6 +149,7 @@ static struct cmd_handler command_handlers[] = {
149 { "reload", cmd_reload }, 149 { "reload", cmd_reload },
150 { "rename", cmd_rename }, 150 { "rename", cmd_rename },
151 { "resize", cmd_resize }, 151 { "resize", cmd_resize },
152 { "scratchpad", cmd_scratchpad },
152 { "split", cmd_split }, 153 { "split", cmd_split },
153 { "splith", cmd_splith }, 154 { "splith", cmd_splith },
154 { "splitt", cmd_splitt }, 155 { "splitt", cmd_splitt },
@@ -326,7 +327,7 @@ struct cmd_results *execute_command(char *_exec, struct sway_seat *seat) {
326 } while(head); 327 } while(head);
327cleanup: 328cleanup:
328 free(exec); 329 free(exec);
329 free(views); 330 list_free(views);
330 if (!results) { 331 if (!results) {
331 results = cmd_results_new(CMD_SUCCESS, NULL, NULL); 332 results = cmd_results_new(CMD_SUCCESS, NULL, NULL);
332 } 333 }