Skip to content

Commit

Permalink
Fix removing blur after ACTION_CANCEL
Browse files Browse the repository at this point in the history
`MotionEvent.ACTION_CANCEL` resets `fadeOutFrom` so `f` becomes
immediately 0, in which case `setBlurRadius` needs to run one
last time to remove the blur.
  • Loading branch information
markusfisch committed Feb 19, 2024
1 parent 77f5f34 commit c7fc828
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1175,13 +1175,13 @@ private boolean drawPieMenu(Canvas canvas) {
} else {
f = fadeInFrom > 0 ? 1f : 0f;
}
if (f <= 0) {
return false;
}
if (prefs.blurBackground() && f < 1f) {
BackgroundBlur.setBlurRadius(window,
Math.round(f * BackgroundBlur.BLUR));
}
if (f <= 0) {
return false;
}
if (prefs.darkenBackground()) {
int max = (translucentBackgroundColor >> 24) & 0xff;
int alpha = Math.round(f * max);
Expand Down

0 comments on commit c7fc828

Please sign in to comment.