mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-21 06:59:44 -05:00
Merge pull request #223 from versusvoid/xwayland-activate
Activate only active xwayland views
This commit is contained in:
commit
6aafc2f61a
3 changed files with 29 additions and 16 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -39,8 +39,12 @@ static void handle_request_configure(struct wl_listener *listener, void *data) {
|
|||
}
|
||||
|
||||
static void activate(struct roots_view *view, bool active) {
|
||||
wlr_xwayland_surface_activate(view->desktop->xwayland,
|
||||
view->xwayland_surface);
|
||||
if (active) {
|
||||
wlr_xwayland_surface_activate(view->desktop->xwayland,
|
||||
view->xwayland_surface);
|
||||
} else {
|
||||
wlr_xwayland_surface_activate(view->desktop->xwayland, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void handle_xwayland_surface(struct wl_listener *listener, void *data) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue