Skip to content

Commit

Permalink
backend: make sure that the resize factor is at least 1
Browse files Browse the repository at this point in the history
a window may have the stacking rank of 0 (e.g. when it's the only window
on the desktop) and making it the resize factor will lead to incorrect
resizing of the associated regions
  • Loading branch information
absolutelynothelix committed Jul 5, 2023
1 parent 4a39423 commit e1b1a45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void paint_all_new(session_t *ps, struct managed_win *t) {
//
// TODO(yshui): maybe we don't need to resize reg_damage, only reg_paint?
int resize_factor = 1;
if (t) {
if (t && t->stacking_rank > 1) {
resize_factor = t->stacking_rank;
}
resize_region_in_place(&reg_damage, blur_width * resize_factor,
Expand Down

0 comments on commit e1b1a45

Please sign in to comment.