diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2019-01-25 08:29:21 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2019-01-25 08:29:21 +1000 |
commit | 20aa8ee67dc528299dbc8735220a1c081c7ff9f6 (patch) | |
tree | 685de48be3db51fc01510ccf051e2b63a4655fba /sway/desktop/output.c | |
parent | Update for swaywm/wlroots#1402 (diff) | |
download | sway-20aa8ee67dc528299dbc8735220a1c081c7ff9f6.tar.gz sway-20aa8ee67dc528299dbc8735220a1c081c7ff9f6.tar.zst sway-20aa8ee67dc528299dbc8735220a1c081c7ff9f6.zip |
Implement fullscreen global
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r-- | sway/desktop/output.c | 30 |
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, | |||
251 | }; | 251 | }; |
252 | 252 | ||
253 | struct sway_workspace *workspace = output_get_active_workspace(output); | 253 | struct sway_workspace *workspace = output_get_active_workspace(output); |
254 | if (workspace->current.fullscreen) { | 254 | struct sway_container *fullscreen_con = root->fullscreen_global; |
255 | for_each_surface_container_iterator( | 255 | if (fullscreen_con && fullscreen_con->scratchpad && |
256 | workspace->current.fullscreen, &data); | 256 | !fullscreen_con->workspace) { |
257 | container_for_each_child(workspace->current.fullscreen, | 257 | fullscreen_con = NULL; |
258 | } | ||
259 | if (!fullscreen_con) { | ||
260 | fullscreen_con = workspace->current.fullscreen; | ||
261 | } | ||
262 | if (fullscreen_con) { | ||
263 | for_each_surface_container_iterator(fullscreen_con, &data); | ||
264 | container_for_each_child(fullscreen_con, | ||
258 | for_each_surface_container_iterator, &data); | 265 | for_each_surface_container_iterator, &data); |
259 | for (int i = 0; i < workspace->current.floating->length; ++i) { | 266 | |
260 | struct sway_container *floater = | 267 | // TODO: Show transient containers for fullscreen global |
261 | workspace->current.floating->items[i]; | 268 | if (fullscreen_con == workspace->current.fullscreen) { |
262 | if (container_is_transient_for(floater, | 269 | for (int i = 0; i < workspace->current.floating->length; ++i) { |
263 | workspace->current.fullscreen)) { | 270 | struct sway_container *floater = |
264 | for_each_surface_container_iterator(floater, &data); | 271 | workspace->current.floating->items[i]; |
272 | if (container_is_transient_for(floater, fullscreen_con)) { | ||
273 | for_each_surface_container_iterator(floater, &data); | ||
274 | } | ||
265 | } | 275 | } |
266 | } | 276 | } |
267 | #if HAVE_XWAYLAND | 277 | #if HAVE_XWAYLAND |