diff options
-rw-r--r-- | sway/tree/view.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index bc66a701..10c97518 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -504,15 +504,13 @@ void view_execute_criteria(struct sway_view *view) { | |||
504 | } | 504 | } |
505 | wlr_log(WLR_DEBUG, "for_window '%s' matches view %p, cmd: '%s'", | 505 | wlr_log(WLR_DEBUG, "for_window '%s' matches view %p, cmd: '%s'", |
506 | criteria->raw, view, criteria->cmdlist); | 506 | criteria->raw, view, criteria->cmdlist); |
507 | seat_set_focus(seat, view->swayc); | ||
507 | list_add(view->executed_criteria, criteria); | 508 | list_add(view->executed_criteria, criteria); |
508 | struct cmd_results *res = execute_command(criteria->cmdlist, NULL); | 509 | struct cmd_results *res = execute_command(criteria->cmdlist, NULL); |
509 | if (res->status != CMD_SUCCESS) { | 510 | if (res->status != CMD_SUCCESS) { |
510 | wlr_log(WLR_ERROR, "Command '%s' failed: %s", res->input, res->error); | 511 | wlr_log(WLR_ERROR, "Command '%s' failed: %s", res->input, res->error); |
511 | } | 512 | } |
512 | free_cmd_results(res); | 513 | free_cmd_results(res); |
513 | // view must be focused for commands to affect it, | ||
514 | // so always refocus in-between command lists | ||
515 | seat_set_focus(seat, view->swayc); | ||
516 | } | 514 | } |
517 | list_free(criterias); | 515 | list_free(criterias); |
518 | seat_set_focus(seat, prior_focus); | 516 | seat_set_focus(seat, prior_focus); |