aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/unmark.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/unmark.c')
-rw-r--r--sway/commands/unmark.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sway/commands/unmark.c b/sway/commands/unmark.c
index 62127c97..c6251dc8 100644
--- a/sway/commands/unmark.c
+++ b/sway/commands/unmark.c
@@ -9,9 +9,9 @@
9#include "stringop.h" 9#include "stringop.h"
10 10
11static void remove_all_marks_iterator(struct sway_container *con, void *data) { 11static void remove_all_marks_iterator(struct sway_container *con, void *data) {
12 if (con->type == C_VIEW) { 12 if (con->view) {
13 view_clear_marks(con->sway_view); 13 view_clear_marks(con->view);
14 view_update_marks_textures(con->sway_view); 14 view_update_marks_textures(con->view);
15 } 15 }
16} 16}
17 17
@@ -24,13 +24,12 @@ struct cmd_results *cmd_unmark(int argc, char **argv) {
24 // Determine the view 24 // Determine the view
25 struct sway_view *view = NULL; 25 struct sway_view *view = NULL;
26 if (config->handler_context.using_criteria) { 26 if (config->handler_context.using_criteria) {
27 struct sway_container *container = 27 struct sway_container *container = config->handler_context.container;
28 config->handler_context.current_container; 28 if (!container->view) {
29 if (container->type != C_VIEW) {
30 return cmd_results_new(CMD_INVALID, "unmark", 29 return cmd_results_new(CMD_INVALID, "unmark",
31 "Only views can have marks"); 30 "Only views can have marks");
32 } 31 }
33 view = container->sway_view; 32 view = container->view;
34 } 33 }
35 34
36 // Determine the mark 35 // Determine the mark