[mutter/wip/cb2eb3: 17/55] frames: Fix border-radius stupidity
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/cb2eb3: 17/55] frames: Fix border-radius stupidity
- Date: Wed, 1 Oct 2014 15:48:51 +0000 (UTC)
commit f53e26bc398f31697229a0476d2f3e1594c73093
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Apr 26 22:39:26 2012 -0400
frames: Fix border-radius stupidity
Since we're breaking the theme format, we don't need to do this any
logner.
src/ui/frames.c | 25 ++++++++-----------------
1 files changed, 8 insertions(+), 17 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index 4a03ec4..a5ff987 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -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++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]