Implement fullscreen global

This commit is contained in:
Ryan Dwyer 2019-01-25 08:29:21 +10:00
parent 75406bb93b
commit 20aa8ee67d
22 changed files with 331 additions and 131 deletions

View file

@ -753,6 +753,18 @@ void seat_set_focus(struct sway_seat *seat, struct sway_node *node) {
return;
}
}
// Deny setting focus to a workspace node when using fullscreen global
if (root->fullscreen_global && !container && new_workspace) {
return;
}
// Deny setting focus to a view which is hidden by a fullscreen global
if (root->fullscreen_global && container != root->fullscreen_global &&
!container_has_ancestor(container, root->fullscreen_global)) {
// Unless it's a transient container
if (!container_is_transient_for(container, root->fullscreen_global)) {
return;
}
}
struct sway_output *new_output = new_workspace->output;