diff options
-rw-r--r-- | sway/commands.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sway/commands.c b/sway/commands.c index 1203f63a..d5cab655 100644 --- a/sway/commands.c +++ b/sway/commands.c | |||
@@ -232,15 +232,6 @@ list_t *execute_command(char *_exec, struct sway_seat *seat, | |||
232 | } | 232 | } |
233 | } | 233 | } |
234 | 234 | ||
235 | // This is the container or workspace which this command will run on. | ||
236 | // Ignored if the command string contains criteria. | ||
237 | struct sway_node *node; | ||
238 | if (con) { | ||
239 | node = &con->node; | ||
240 | } else { | ||
241 | node = seat_get_focus_inactive(seat, &root->node); | ||
242 | } | ||
243 | |||
244 | config->handler_context.seat = seat; | 235 | config->handler_context.seat = seat; |
245 | 236 | ||
246 | head = exec; | 237 | head = exec; |
@@ -301,6 +292,9 @@ list_t *execute_command(char *_exec, struct sway_seat *seat, | |||
301 | } | 292 | } |
302 | 293 | ||
303 | if (!config->handler_context.using_criteria) { | 294 | if (!config->handler_context.using_criteria) { |
295 | // The container or workspace which this command will run on. | ||
296 | struct sway_node *node = con ? &con->node : | ||
297 | seat_get_focus_inactive(seat, &root->node); | ||
304 | set_config_node(node); | 298 | set_config_node(node); |
305 | struct cmd_results *res = handler->handle(argc-1, argv+1); | 299 | struct cmd_results *res = handler->handle(argc-1, argv+1); |
306 | list_add(res_list, res); | 300 | list_add(res_list, res); |