diff options
author | emersion <contact@emersion.fr> | 2018-06-05 11:18:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-05 11:18:52 +0100 |
commit | 0f715470328cbb5be77f95c7e209ce6bace2ef19 (patch) | |
tree | 13ee137d7e5b71d119357898c6c1529aa653931a | |
parent | Merge pull request #2103 from RyanDwyer/focus-fixes (diff) | |
parent | Only send frame to visible surfaces when fullscreened (diff) | |
download | sway-0f715470328cbb5be77f95c7e209ce6bace2ef19.tar.gz sway-0f715470328cbb5be77f95c7e209ce6bace2ef19.tar.zst sway-0f715470328cbb5be77f95c7e209ce6bace2ef19.zip |
Merge pull request #2095 from emersion/fullscreen-damage-only-visible
Only send frame to visible surfaces when fullscreened
-rw-r--r-- | sway/desktop/output.c | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 3fa586d0..acc9caae 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -988,20 +988,30 @@ static void send_frame_done(struct sway_output *output, struct timespec *when) { | |||
988 | .when = when, | 988 | .when = when, |
989 | }; | 989 | }; |
990 | 990 | ||
991 | send_frame_done_layer(&data, | ||
992 | &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND]); | ||
993 | send_frame_done_layer(&data, | ||
994 | &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM]); | ||
995 | |||
996 | struct sway_container *workspace = output_get_active_workspace(output); | 991 | struct sway_container *workspace = output_get_active_workspace(output); |
997 | send_frame_done_container(&data, workspace); | 992 | if (workspace->sway_workspace->fullscreen) { |
998 | send_frame_done_container(&data, workspace->sway_workspace->floating); | 993 | send_frame_done_container_iterator( |
994 | workspace->sway_workspace->fullscreen->swayc, &data); | ||
995 | |||
996 | if (workspace->sway_workspace->fullscreen->type == SWAY_VIEW_XWAYLAND) { | ||
997 | send_frame_done_unmanaged(&data, | ||
998 | &root_container.sway_root->xwayland_unmanaged); | ||
999 | } | ||
1000 | } else { | ||
1001 | send_frame_done_layer(&data, | ||
1002 | &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND]); | ||
1003 | send_frame_done_layer(&data, | ||
1004 | &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM]); | ||
999 | 1005 | ||
1000 | send_frame_done_unmanaged(&data, | 1006 | send_frame_done_container(&data, workspace); |
1001 | &root_container.sway_root->xwayland_unmanaged); | 1007 | send_frame_done_container(&data, workspace->sway_workspace->floating); |
1008 | |||
1009 | send_frame_done_unmanaged(&data, | ||
1010 | &root_container.sway_root->xwayland_unmanaged); | ||
1011 | send_frame_done_layer(&data, | ||
1012 | &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]); | ||
1013 | } | ||
1002 | 1014 | ||
1003 | send_frame_done_layer(&data, | ||
1004 | &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]); | ||
1005 | send_frame_done_layer(&data, | 1015 | send_frame_done_layer(&data, |
1006 | &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY]); | 1016 | &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY]); |
1007 | } | 1017 | } |