aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
authorMarkus Ongyerth <ongy@ongy.net>2018-02-26 10:37:29 +0100
committerDrew DeVault <sir@cmpwn.com>2018-03-26 23:18:50 -0400
commit43d7459734423e5733fb89e95d866da46bf42842 (patch)
tree63ba0026e9e12fb1d62543d3ecfc1dc44b8f665a /rootston
parent891610081fe1a8279fbe50d548bb6d42074aaae1 (diff)
unset fullscreen when surface is brought to front
The output fullscreen surfaces are drawn in front of everything, without consideration for view z-order. If a view is brought to front, unset any fullscreen view that would cover this view to make sure the view is visible.
Diffstat (limited to 'rootston')
-rw-r--r--rootston/seat.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/rootston/seat.c b/rootston/seat.c
index d2d211ba..052f63da 100644
--- a/rootston/seat.c
+++ b/rootston/seat.c
@@ -715,6 +715,16 @@ struct roots_seat_view *roots_seat_view_from_view(
return seat_view;
}
+static void release_fullscreen(struct roots_output *output) {
+ if (output->fullscreen_view) {
+ if (output->fullscreen_view->set_fullscreen) {
+ output->fullscreen_view->set_fullscreen(
+ output->fullscreen_view, false);
+ }
+ view_set_fullscreen(output->fullscreen_view, false, output->wlr_output);
+ }
+}
+
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
@@ -723,6 +733,17 @@ void roots_seat_set_focus(struct roots_seat *seat, struct roots_view *view) {
wl_list_insert(&seat->input->server->desktop->views, &view->link);
}
+ 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 (wlr_output_layout_intersects(desktop->layout,
+ output->wlr_output, &box)) {
+ release_fullscreen(output);
+ }
+ }
+
struct roots_view *prev_focus = roots_seat_get_focus(seat);
if (view == prev_focus) {
return;