Skip to content

Commit

Permalink
animation stretching fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dqrk0jeste committed Feb 20, 2025
1 parent b8e4c36 commit 429ecfc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/rendering.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ scene_buffer_apply_effects(struct wlr_scene_buffer *buffer,
uint32_t buffer_width = buffer->buffer->width;
uint32_t buffer_height = buffer->buffer->height;

if(buffer_width < 0.5 * geometry_width || buffer_height < 0.5 * geometry_height) return;
if(buffer_width < 0.75 * geometry_width || buffer_height < 0.75 * geometry_height) return;

if(server.config->blur) {
wlr_scene_buffer_set_backdrop_blur(buffer, true);
Expand All @@ -86,7 +86,9 @@ scene_buffer_apply_effects(struct wlr_scene_buffer *buffer,
wlr_scene_buffer_set_corner_radius(buffer, border_radius,
server.config->border_radius_location);

wlr_scene_buffer_set_dest_size(buffer, width, height);
if(width != 0) {
wlr_scene_buffer_set_dest_size(buffer, width, height);
}
}

void
Expand Down Expand Up @@ -133,8 +135,8 @@ toplevel_apply_effects(struct mwc_toplevel *toplevel) {
? 0
: max(server.config->border_radius - server.config->border_width, 0);

uint32_t width, height;
toplevel_get_actual_size(toplevel, &width, &height);
uint32_t width = toplevel->animation.running ? toplevel->animation.current.width : 0;
uint32_t height = toplevel->animation.running ? toplevel->animation.current.height : 0;

struct wlr_box geometry = toplevel_get_geometry(toplevel);

Expand Down

0 comments on commit 429ecfc

Please sign in to comment.