aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/view.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-05-16 11:39:43 +0100
committerGitHub <noreply@github.com>2018-05-16 11:39:43 +0100
commit6a13f3eb385c5d6b82a3e23b6345e47848916676 (patch)
tree11af860046e84f5015676312f5a45a20739baf40 /sway/tree/view.c
parent2df8f266cd758221ad6e0fa182feb3b4c6d4142c (diff)
parentfc96f004d21ea52d95d3bbd68316c27e3a46409b (diff)
Merge pull request #1994 from RyanDwyer/fix-focus-stealing
Don't steal focus when a view changes its title
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index ec7f3031..833345c5 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -365,8 +365,7 @@ void view_execute_criteria(struct sway_view *view) {
return;
}
struct sway_seat *seat = input_manager_current_seat(input_manager);
- struct sway_container *prior_workspace =
- container_parent(view->swayc, C_WORKSPACE);
+ struct sway_container *prior_focus = seat_get_focus(seat);
list_t *criterias = criteria_for_view(view, CT_COMMAND);
for (int i = 0; i < criterias->length; i++) {
struct criteria *criteria = criterias->items[i];
@@ -388,7 +387,7 @@ void view_execute_criteria(struct sway_view *view) {
seat_set_focus(seat, view->swayc);
}
list_free(criterias);
- seat_set_focus(seat, seat_get_focus_inactive(seat, prior_workspace));
+ seat_set_focus(seat, prior_focus);
}
void view_map(struct sway_view *view, struct wlr_surface *wlr_surface) {