Deactivate xwayland when focus leaves there

This commit is contained in:
Drew DeVault 2017-10-06 09:34:22 -04:00
parent 4d7ff3cb48
commit 528f000a7a
3 changed files with 25 additions and 14 deletions

View file

@ -137,11 +137,14 @@ static void set_view_focus(struct roots_input *input,
size_t index = 0;
for (size_t i = 0; i < desktop->views->length; ++i) {
struct roots_view *_view = desktop->views->items[i];
view_activate(_view, _view == view);
if (_view != view) {
view_activate(_view, false);
}
if (view == _view) {
index = i;
}
}
view_activate(view, true);
// TODO: list_swap
list_del(desktop->views, index);
list_add(desktop->views, view);