aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/view.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-05-16 20:29:04 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-05-16 20:29:04 +1000
commitfc96f004d21ea52d95d3bbd68316c27e3a46409b (patch)
tree11af860046e84f5015676312f5a45a20739baf40 /sway/tree/view.c
parentMerge pull request #1991 from martinetd/ready_nox (diff)
downloadsway-fc96f004d21ea52d95d3bbd68316c27e3a46409b.tar.gz
sway-fc96f004d21ea52d95d3bbd68316c27e3a46409b.tar.zst
sway-fc96f004d21ea52d95d3bbd68316c27e3a46409b.zip
Don't steal focus when a view changes its title
Fixes #1989
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) {
365 return; 365 return;
366 } 366 }
367 struct sway_seat *seat = input_manager_current_seat(input_manager); 367 struct sway_seat *seat = input_manager_current_seat(input_manager);
368 struct sway_container *prior_workspace = 368 struct sway_container *prior_focus = seat_get_focus(seat);
369 container_parent(view->swayc, C_WORKSPACE);
370 list_t *criterias = criteria_for_view(view, CT_COMMAND); 369 list_t *criterias = criteria_for_view(view, CT_COMMAND);
371 for (int i = 0; i < criterias->length; i++) { 370 for (int i = 0; i < criterias->length; i++) {
372 struct criteria *criteria = criterias->items[i]; 371 struct criteria *criteria = criterias->items[i];
@@ -388,7 +387,7 @@ void view_execute_criteria(struct sway_view *view) {
388 seat_set_focus(seat, view->swayc); 387 seat_set_focus(seat, view->swayc);
389 } 388 }
390 list_free(criterias); 389 list_free(criterias);
391 seat_set_focus(seat, seat_get_focus_inactive(seat, prior_workspace)); 390 seat_set_focus(seat, prior_focus);
392} 391}
393 392
394void view_map(struct sway_view *view, struct wlr_surface *wlr_surface) { 393void view_map(struct sway_view *view, struct wlr_surface *wlr_surface) {