diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-10-06 09:34:22 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-10-06 09:34:22 -0400 |
commit | 528f000a7a5ed8b26a14ca09263dc0e7024aba8f (patch) | |
tree | a0cfde9f70bb47f33d59991faae7351c068554bd /rootston | |
parent | 4d7ff3cb48d1057765d7307081d8387648ab59b1 (diff) |
Deactivate xwayland when focus leaves there
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/cursor.c | 5 | ||||
-rw-r--r-- | rootston/xwayland.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c index eec8eb5d..0ca45f16 100644 --- a/rootston/cursor.c +++ b/rootston/cursor.c @@ -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); diff --git a/rootston/xwayland.c b/rootston/xwayland.c index 59bb2632..bb8ced8e 100644 --- a/rootston/xwayland.c +++ b/rootston/xwayland.c @@ -42,6 +42,8 @@ static void activate(struct roots_view *view, bool active) { if (active) { wlr_xwayland_surface_activate(view->desktop->xwayland, view->xwayland_surface); + } else { + wlr_xwayland_surface_activate(view->desktop->xwayland, NULL); } } |