mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -05:00
shadow-factory: Make sure to never use a negative spread
The smallest possible spread corresponds to an unblurred shadow, which neither grows nor shrinks - thus the spread should be zero not negative as returned by our current calculation. https://bugzilla.gnome.org/show_bug.cgi?id=731353
This commit is contained in:
parent
fba022cc06
commit
98e219da4b
@ -496,7 +496,12 @@ get_box_filter_size (int radius)
|
||||
static int
|
||||
get_shadow_spread (int radius)
|
||||
{
|
||||
int d = get_box_filter_size (radius);
|
||||
int d;
|
||||
|
||||
if (radius == 0)
|
||||
return 0;
|
||||
|
||||
d = get_box_filter_size (radius);
|
||||
|
||||
if (d % 2 == 1)
|
||||
return 3 * (d / 2);
|
||||
|
Loading…
Reference in New Issue
Block a user