diff options
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sway/commands.c b/sway/commands.c index 60c64776..9b6d6459 100644 --- a/sway/commands.c +++ b/sway/commands.c | |||
@@ -175,6 +175,7 @@ static struct cmd_handler command_handlers[] = { | |||
175 | { "focus", cmd_focus }, | 175 | { "focus", cmd_focus }, |
176 | { "kill", cmd_kill }, | 176 | { "kill", cmd_kill }, |
177 | { "layout", cmd_layout }, | 177 | { "layout", cmd_layout }, |
178 | { "mark", cmd_mark }, | ||
178 | { "move", cmd_move }, | 179 | { "move", cmd_move }, |
179 | { "opacity", cmd_opacity }, | 180 | { "opacity", cmd_opacity }, |
180 | { "reload", cmd_reload }, | 181 | { "reload", cmd_reload }, |
@@ -185,6 +186,7 @@ static struct cmd_handler command_handlers[] = { | |||
185 | { "splitt", cmd_splitt }, | 186 | { "splitt", cmd_splitt }, |
186 | { "splitv", cmd_splitv }, | 187 | { "splitv", cmd_splitv }, |
187 | { "title_format", cmd_title_format }, | 188 | { "title_format", cmd_title_format }, |
189 | { "unmark", cmd_unmark }, | ||
188 | }; | 190 | }; |
189 | 191 | ||
190 | static int handler_compare(const void *_a, const void *_b) { | 192 | static int handler_compare(const void *_a, const void *_b) { |
@@ -300,7 +302,7 @@ struct cmd_results *execute_command(char *_exec, struct sway_seat *seat) { | |||
300 | head = exec; | 302 | head = exec; |
301 | do { | 303 | do { |
302 | // Extract criteria (valid for this command list only). | 304 | // Extract criteria (valid for this command list only). |
303 | bool has_criteria = false; | 305 | config->handler_context.using_criteria = false; |
304 | if (*head == '[') { | 306 | if (*head == '[') { |
305 | char *error = NULL; | 307 | char *error = NULL; |
306 | struct criteria *criteria = criteria_parse(head, &error); | 308 | struct criteria *criteria = criteria_parse(head, &error); |
@@ -313,7 +315,7 @@ struct cmd_results *execute_command(char *_exec, struct sway_seat *seat) { | |||
313 | views = criteria_get_views(criteria); | 315 | views = criteria_get_views(criteria); |
314 | head += strlen(criteria->raw); | 316 | head += strlen(criteria->raw); |
315 | criteria_destroy(criteria); | 317 | criteria_destroy(criteria); |
316 | has_criteria = true; | 318 | config->handler_context.using_criteria = true; |
317 | // Skip leading whitespace | 319 | // Skip leading whitespace |
318 | head += strspn(head, whitespace); | 320 | head += strspn(head, whitespace); |
319 | } | 321 | } |
@@ -350,7 +352,7 @@ struct cmd_results *execute_command(char *_exec, struct sway_seat *seat) { | |||
350 | goto cleanup; | 352 | goto cleanup; |
351 | } | 353 | } |
352 | 354 | ||
353 | if (!has_criteria) { | 355 | if (!config->handler_context.using_criteria) { |
354 | // without criteria, the command acts upon the focused | 356 | // without criteria, the command acts upon the focused |
355 | // container | 357 | // container |
356 | config->handler_context.current_container = | 358 | config->handler_context.current_container = |