diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-04-16 20:36:40 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-04-16 20:36:40 +1000 |
commit | 52420cc24d61db8d22cf0d391f1f84b37bf087d5 (patch) | |
tree | f975a3708c0d1562a8d2fcdceaed9a76aadbf1f4 /sway/desktop/output.c | |
parent | Merge pull request #1816 from thejan2009/multi-output-ws-destroy (diff) | |
download | sway-52420cc24d61db8d22cf0d391f1f84b37bf087d5.tar.gz sway-52420cc24d61db8d22cf0d391f1f84b37bf087d5.tar.zst sway-52420cc24d61db8d22cf0d391f1f84b37bf087d5.zip |
Implement fullscreen.
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r-- | sway/desktop/output.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 1b3143d0..b86f20e8 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -273,17 +273,25 @@ static void render_output(struct sway_output *output, struct timespec *when, | |||
273 | float clear_color[] = {0.25f, 0.25f, 0.25f, 1.0f}; | 273 | float clear_color[] = {0.25f, 0.25f, 0.25f, 1.0f}; |
274 | wlr_renderer_clear(renderer, clear_color); | 274 | wlr_renderer_clear(renderer, clear_color); |
275 | 275 | ||
276 | render_layer(output, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND]); | ||
277 | render_layer(output, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM]); | ||
278 | |||
279 | struct sway_container *workspace = output_get_active_workspace(output); | 276 | struct sway_container *workspace = output_get_active_workspace(output); |
280 | render_container(output, workspace); | ||
281 | 277 | ||
282 | render_unmanaged(output, &root_container.sway_root->xwayland_unmanaged); | 278 | if (workspace->fullscreen) { |
279 | wlr_output_set_fullscreen_surface(wlr_output, | ||
280 | workspace->fullscreen->surface); | ||
281 | } else { | ||
282 | wlr_output_set_fullscreen_surface(wlr_output, NULL); | ||
283 | render_layer(output, | ||
284 | &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND]); | ||
285 | render_layer(output, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM]); | ||
286 | |||
287 | render_container(output, workspace); | ||
283 | 288 | ||
284 | // TODO: consider revising this when fullscreen windows are supported | 289 | render_unmanaged(output, &root_container.sway_root->xwayland_unmanaged); |
285 | render_layer(output, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]); | 290 | |
286 | render_layer(output, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY]); | 291 | render_layer(output, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]); |
292 | render_layer(output, | ||
293 | &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY]); | ||
294 | } | ||
287 | 295 | ||
288 | renderer_end: | 296 | renderer_end: |
289 | if (root_container.sway_root->debug_tree) { | 297 | if (root_container.sway_root->debug_tree) { |