aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-06-02 20:55:34 +0100
committeremersion <contact@emersion.fr>2018-06-02 20:56:33 +0100
commit34bdf25bb5af5f36568e0af8b6a95f2c93552d07 (patch)
treeadcf09ecb1e91b9488401c141155fbb2fc79a7ba /sway
parentfb932cf8477120ee9fd9db37be1cd26a603fe0a3 (diff)
Only send frame to visible surfaces when fullscreened
Diffstat (limited to 'sway')
-rw-r--r--sway/desktop/output.c32
1 files changed, 21 insertions, 11 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index 964cfe00..a9ff9782 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -969,20 +969,30 @@ static void send_frame_done(struct sway_output *output, struct timespec *when) {
.when = when,
};
- send_frame_done_layer(&data,
- &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND]);
- send_frame_done_layer(&data,
- &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM]);
-
struct sway_container *workspace = output_get_active_workspace(output);
- send_frame_done_container(&data, workspace);
- send_frame_done_container(&data, workspace->sway_workspace->floating);
+ if (workspace->sway_workspace->fullscreen) {
+ send_frame_done_container_iterator(
+ workspace->sway_workspace->fullscreen->swayc, &data);
+
+ if (workspace->sway_workspace->fullscreen->type == SWAY_VIEW_XWAYLAND) {
+ send_frame_done_unmanaged(&data,
+ &root_container.sway_root->xwayland_unmanaged);
+ }
+ } else {
+ send_frame_done_layer(&data,
+ &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND]);
+ send_frame_done_layer(&data,
+ &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM]);
- send_frame_done_unmanaged(&data,
- &root_container.sway_root->xwayland_unmanaged);
+ send_frame_done_container(&data, workspace);
+ send_frame_done_container(&data, workspace->sway_workspace->floating);
+
+ send_frame_done_unmanaged(&data,
+ &root_container.sway_root->xwayland_unmanaged);
+ send_frame_done_layer(&data,
+ &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]);
+ }
- send_frame_done_layer(&data,
- &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]);
send_frame_done_layer(&data,
&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY]);
}