aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-07-16 22:27:11 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-07-16 22:27:11 +1000
commite2f28c023c8c5e9e847e2e9495a009b645bc60fc (patch)
treec380b85e10b4008218c43238e06abce8a296b8df /sway
parentfc2484095a71206fe82f5042c0d127458a8da3bc (diff)
Focus view before running criteria when mapping
Diffstat (limited to 'sway')
-rw-r--r--sway/tree/view.c4
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) {
}
wlr_log(WLR_DEBUG, "for_window '%s' matches view %p, cmd: '%s'",
criteria->raw, view, criteria->cmdlist);
+ seat_set_focus(seat, view->swayc);
list_add(view->executed_criteria, criteria);
struct cmd_results *res = execute_command(criteria->cmdlist, NULL);
if (res->status != CMD_SUCCESS) {
wlr_log(WLR_ERROR, "Command '%s' failed: %s", res->input, res->error);
}
free_cmd_results(res);
- // view must be focused for commands to affect it,
- // so always refocus in-between command lists
- seat_set_focus(seat, view->swayc);
}
list_free(criterias);
seat_set_focus(seat, prior_focus);