summaryrefslogtreecommitdiffstats
path: root/sway/commands/mark.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/mark.c')
-rw-r--r--sway/commands/mark.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sway/commands/mark.c b/sway/commands/mark.c
index 9ea8c301..fb95a7d0 100644
--- a/sway/commands/mark.c
+++ b/sway/commands/mark.c
@@ -18,13 +18,12 @@ struct cmd_results *cmd_mark(int argc, char **argv) {
18 if ((error = checkarg(argc, "mark", EXPECTED_AT_LEAST, 1))) { 18 if ((error = checkarg(argc, "mark", EXPECTED_AT_LEAST, 1))) {
19 return error; 19 return error;
20 } 20 }
21 struct sway_container *container = 21 struct sway_container *container = config->handler_context.container;
22 config->handler_context.current_container; 22 if (!container->view) {
23 if (container->type != C_VIEW) {
24 return cmd_results_new(CMD_INVALID, "mark", 23 return cmd_results_new(CMD_INVALID, "mark",
25 "Only views can have marks"); 24 "Only views can have marks");
26 } 25 }
27 struct sway_view *view = container->sway_view; 26 struct sway_view *view = container->view;
28 27
29 bool add = false, toggle = false; 28 bool add = false, toggle = false;
30 while (argc > 0 && strncmp(*argv, "--", 2) == 0) { 29 while (argc > 0 && strncmp(*argv, "--", 2) == 0) {