summaryrefslogtreecommitdiff
path: root/sway/commands/unmark.c
diff options
context:
space:
mode:
authorDrew DeVault <[email protected]>2018-09-05 09:33:27 -0400
committerGitHub <[email protected]>2018-09-05 09:33:27 -0400
commit610eb946171f782165a20614b2d3318b89273990 (patch)
tree05eec1df1ef48e05b23d273d31143ad32e7632d2 /sway/commands/unmark.c
parentaa2bf98e0442f9bf41a852c2fafee5b0897010a2 (diff)
parentdbf4aa3e33bdee53876c6893b15ac3f224818e7c (diff)
Merge pull request #2540 from RyanDwyer/typesafety
Implement type safe arguments and demote sway_container
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 @@
#include "stringop.h"
static void remove_all_marks_iterator(struct sway_container *con, void *data) {
- if (con->type == C_VIEW) {
- view_clear_marks(con->sway_view);
- view_update_marks_textures(con->sway_view);
+ if (con->view) {
+ view_clear_marks(con->view);
+ view_update_marks_textures(con->view);
}
}
@@ -24,13 +24,12 @@ struct cmd_results *cmd_unmark(int argc, char **argv) {
// Determine the view
struct sway_view *view = NULL;
if (config->handler_context.using_criteria) {
- struct sway_container *container =
- config->handler_context.current_container;
- if (container->type != C_VIEW) {
+ struct sway_container *container = config->handler_context.container;
+ if (!container->view) {
return cmd_results_new(CMD_INVALID, "unmark",
"Only views can have marks");
}
- view = container->sway_view;
+ view = container->view;
}
// Determine the mark