diff options
author | emersion <contact@emersion.fr> | 2017-11-19 19:30:48 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2017-11-19 19:30:48 +0100 |
commit | 9687950de158d39904c8bec7e41d397baefd541a (patch) | |
tree | 76a479c808b51d3d3aee07a0dd2e5ab8e80a17d5 | |
parent | 97ddd2d1df439a5b074e4dfa2865479646b8f3a6 (diff) |
Raise the view on the desktop even if already focused in the seat
-rw-r--r-- | rootston/seat.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/rootston/seat.c b/rootston/seat.c index df6b8590..70ecec7e 100644 --- a/rootston/seat.c +++ b/rootston/seat.c @@ -539,6 +539,13 @@ static struct roots_seat_view *seat_add_view(struct roots_seat *seat, } void roots_seat_set_focus(struct roots_seat *seat, struct roots_view *view) { + // Make sure the view will be rendered on top of others, even if it's + // already focused in this seat + if (view != NULL) { + wl_list_remove(&view->link); + wl_list_insert(&seat->input->server->desktop->views, &view->link); + } + struct roots_view *prev_focus = roots_seat_get_focus(seat); if (view == prev_focus) { return; @@ -569,7 +576,7 @@ void roots_seat_set_focus(struct roots_seat *seat, struct roots_view *view) { seat->has_focus = false; - // deactivate the old view if it is not focused by some other seat + // Deactivate the old view if it is not focused by some other seat if (prev_focus != NULL && !input_view_has_focus(seat->input, prev_focus)) { view_activate(prev_focus, false); } @@ -580,9 +587,6 @@ void roots_seat_set_focus(struct roots_seat *seat, struct roots_view *view) { } view_activate(view, true); - wl_list_remove(&seat_view->view->link); - wl_list_insert(&seat->input->server->desktop->views, - &seat_view->view->link); seat->has_focus = true; wl_list_remove(&seat_view->link); |