diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-03-28 00:20:39 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-03-28 00:20:39 -0400 |
commit | 41e54ba632ae5804d09f75f1af4a708ea33932cf (patch) | |
tree | 79a523c5dc4bdf148361ebcda47c4d6a9027e98a /rootston/seat.c | |
parent | edb643fc6c55b47dd766b4e516b16108719d1ecd (diff) | |
parent | 330ee081269790922a46091399b616b12ce14f51 (diff) |
Merge branch 'master' into xdg-positioner
Diffstat (limited to 'rootston/seat.c')
-rw-r--r-- | rootston/seat.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/rootston/seat.c b/rootston/seat.c index d2d211ba..bdcad5c7 100644 --- a/rootston/seat.c +++ b/rootston/seat.c @@ -723,6 +723,33 @@ void roots_seat_set_focus(struct roots_seat *seat, struct roots_view *view) { wl_list_insert(&seat->input->server->desktop->views, &view->link); } + + bool unfullscreen = true; + +#ifdef WLR_HAS_XWAYLAND + if (view && view->type == ROOTS_XWAYLAND_VIEW && + view->xwayland_surface->override_redirect) { + unfullscreen = false; + } +#endif + + if (view && unfullscreen) { + struct roots_desktop *desktop = view->desktop; + struct roots_output *output; + struct wlr_box box; + view_get_box(view, &box); + wl_list_for_each(output, &desktop->outputs, link) { + if (output->fullscreen_view && + output->fullscreen_view != view && + wlr_output_layout_intersects( + desktop->layout, + output->wlr_output, &box)) { + view_set_fullscreen(output->fullscreen_view, + false, NULL); + } + } + } + struct roots_view *prev_focus = roots_seat_get_focus(seat); if (view == prev_focus) { return; |