Skip to content

Commit

Permalink
Draw rect and shadow on "Spring effect" for fullscreen views
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikReider committed Jan 24, 2024
1 parent 83e0872 commit b71c56c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions sway/desktop/render.c
Original file line number Diff line number Diff line change
Expand Up @@ -2237,6 +2237,27 @@ void output_render(struct sway_output *output, struct timespec *when,
for (int i = 0; i < 2; i++) {
struct sway_workspace *ws = workspaces[i];
if (!ws) {
// Render a blank rect next to the fullscreen container if
// there's nothing to render
struct decoration_data deco_data = get_undecorated_decoration_data();
deco_data.on_focused_workspace = false;
struct wlr_box mon_box = { 0, 0, output->width, output->height };
adjust_box_to_workspace_offset(&mon_box, &deco_data, output);
scale_box(&mon_box, output->wlr_output->scale);
render_rect(output, damage, &mon_box, clear_color);

// Render a shadow to separate the edge and the fullscreen
// container
if (!config_should_parameters_shadow()) {
continue;
}
struct wlr_box shadow_box = { 0, 0, output->width, output->height };
deco_data.on_focused_workspace = true;
adjust_box_to_workspace_offset(&shadow_box, &deco_data, output);
scale_box(&shadow_box, output->wlr_output->scale);
render_box_shadow(output, damage, &shadow_box,
config->shadow_color, config->shadow_blur_sigma, 0,
0, 0);
continue;
}

Expand Down

0 comments on commit b71c56c

Please sign in to comment.