diff options
author | Drew DeVault <[email protected]> | 2018-07-25 08:32:32 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2018-07-25 08:32:32 -0400 |
commit | 53dbe2da4bd2563ec69211d0c51fb347109fc70d (patch) | |
tree | b7de5dc2d2556866aec06c5c513ac3020b6af2d6 /sway/desktop/render.c | |
parent | fc718f629af231f8a0ae795b2f7529e213cab183 (diff) | |
parent | 0e79b2114c0bd374c6b4a37fc2ee0e672b8fbb38 (diff) |
Merge pull request #2353 from emersion/render-opaque-overlay
Improve rendering with a fullscreen opaque overlay surface
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r-- | sway/desktop/render.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c index 3e7bd94b..15c5b94c 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c @@ -837,21 +837,12 @@ void output_render(struct sway_output *output, struct timespec *when, struct sway_container *workspace = output_get_active_workspace(output); struct sway_view *fullscreen_view = workspace->current.ws_fullscreen; - struct sway_seat *seat = input_manager_current_seat(input_manager); - - if (output_has_opaque_lockscreen(output, seat) && seat->focused_layer) { - struct wlr_layer_surface *wlr_layer_surface = seat->focused_layer; - struct sway_layer_surface *sway_layer_surface = - layer_from_wlr_layer_surface(seat->focused_layer); - struct render_data data = { - .output = output, - .damage = damage, - .alpha = 1.0f, - }; - output_surface_for_each_surface(wlr_layer_surface->surface, - sway_layer_surface->geo.x, sway_layer_surface->geo.y, - &data.root_geo, render_surface_iterator, &data); - } else if (fullscreen_view) { + + if (output_has_opaque_overlay_layer_surface(output)) { + goto render_overlay; + } + + if (fullscreen_view) { float clear_color[] = {0.0f, 0.0f, 0.0f, 1.0f}; int nrects; @@ -897,6 +888,8 @@ void output_render(struct sway_output *output, struct timespec *when, render_layer(output, damage, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]); } + +render_overlay: render_layer(output, damage, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY]); render_drag_icons(output, damage, &root_container.sway_root->drag_icons); |