frames: Fix border-radius stupidity

Since we're breaking the theme format, we don't need to do this any
logner.
This commit is contained in:
Jasper St. Pierre 2012-04-26 22:39:26 -04:00
parent cc3be6da4d
commit f53e26bc39

View File

@ -701,23 +701,14 @@ meta_frames_get_corner_radiuses (MetaFrames *frames,
meta_frames_calc_geometry (frames, frame, &fgeom);
/* For compatibility with the code in get_visible_rect(), there's
* a mysterious sqrt() added to the corner radiuses:
*
* const float radius = sqrt(corner) + corner;
*
* It's unclear why the radius is calculated like this, but we
* need to be consistent with it.
*/
if (top_left)
*top_left = fgeom.top_left_corner_rounded_radius + sqrt(fgeom.top_left_corner_rounded_radius);
*top_left = fgeom.top_left_corner_rounded_radius;
if (top_right)
*top_right = fgeom.top_right_corner_rounded_radius + sqrt(fgeom.top_right_corner_rounded_radius);
*top_right = fgeom.top_right_corner_rounded_radius;
if (bottom_left)
*bottom_left = fgeom.bottom_left_corner_rounded_radius + sqrt(fgeom.bottom_left_corner_rounded_radius);
*bottom_left = fgeom.bottom_left_corner_rounded_radius;
if (bottom_right)
*bottom_right = fgeom.bottom_right_corner_rounded_radius + sqrt(fgeom.bottom_right_corner_rounded_radius);
*bottom_right = fgeom.bottom_right_corner_rounded_radius;
}
void
@ -800,7 +791,7 @@ get_visible_region (MetaFrames *frames,
if (fgeom->top_left_corner_rounded_radius != 0)
{
const int corner = fgeom->top_left_corner_rounded_radius;
const float radius = sqrt(corner) + corner;
const float radius = corner;
int i;
for (i=0; i<corner; i++)
@ -818,7 +809,7 @@ get_visible_region (MetaFrames *frames,
if (fgeom->top_right_corner_rounded_radius != 0)
{
const int corner = fgeom->top_right_corner_rounded_radius;
const float radius = sqrt(corner) + corner;
const float radius = corner;
int i;
for (i=0; i<corner; i++)
@ -836,7 +827,7 @@ get_visible_region (MetaFrames *frames,
if (fgeom->bottom_left_corner_rounded_radius != 0)
{
const int corner = fgeom->bottom_left_corner_rounded_radius;
const float radius = sqrt(corner) + corner;
const float radius = corner;
int i;
for (i=0; i<corner; i++)
@ -854,7 +845,7 @@ get_visible_region (MetaFrames *frames,
if (fgeom->bottom_right_corner_rounded_radius != 0)
{
const int corner = fgeom->bottom_right_corner_rounded_radius;
const float radius = sqrt(corner) + corner;
const float radius = corner;
int i;
for (i=0; i<corner; i++)