aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/output.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-01-27 18:06:50 -0500
committerGitHub <noreply@github.com>2019-01-27 18:06:50 -0500
commit783fadab284c79c8e13625e5e2a2eefae02c75d3 (patch)
tree795c5c69a7fcfc9336115ac157a41b943190f206 /sway/desktop/output.c
parent897250c65fb4d7123361dc6f77c2824179ed8885 (diff)
parent20aa8ee67dc528299dbc8735220a1c081c7ff9f6 (diff)
downloadsway-783fadab284c79c8e13625e5e2a2eefae02c75d3.tar.xz
Merge pull request #3423 from RyanDwyer/fullscreen-global
Implement fullscreen global
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r--sway/desktop/output.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index f18a118f..b5f164cb 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -251,17 +251,27 @@ static void output_for_each_surface(struct sway_output *output,
};
struct sway_workspace *workspace = output_get_active_workspace(output);
- if (workspace->current.fullscreen) {
- for_each_surface_container_iterator(
- workspace->current.fullscreen, &data);
- container_for_each_child(workspace->current.fullscreen,
+ struct sway_container *fullscreen_con = root->fullscreen_global;
+ if (fullscreen_con && fullscreen_con->scratchpad &&
+ !fullscreen_con->workspace) {
+ fullscreen_con = NULL;
+ }
+ if (!fullscreen_con) {
+ fullscreen_con = workspace->current.fullscreen;
+ }
+ if (fullscreen_con) {
+ for_each_surface_container_iterator(fullscreen_con, &data);
+ container_for_each_child(fullscreen_con,
for_each_surface_container_iterator, &data);
- for (int i = 0; i < workspace->current.floating->length; ++i) {
- struct sway_container *floater =
- workspace->current.floating->items[i];
- if (container_is_transient_for(floater,
- workspace->current.fullscreen)) {
- for_each_surface_container_iterator(floater, &data);
+
+ // TODO: Show transient containers for fullscreen global
+ if (fullscreen_con == workspace->current.fullscreen) {
+ for (int i = 0; i < workspace->current.floating->length; ++i) {
+ struct sway_container *floater =
+ workspace->current.floating->items[i];
+ if (container_is_transient_for(floater, fullscreen_con)) {
+ for_each_surface_container_iterator(floater, &data);
+ }
}
}
#if HAVE_XWAYLAND