[mutter] frames: Add a multiplier to increase the size of resize corners
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] frames: Add a multiplier to increase the size of resize corners
- Date: Sat, 9 Jun 2012 03:09:52 +0000 (UTC)
commit dc50ccf9b722bc49ae5e7ae242e1973c473ca33b
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Jun 5 16:16:29 2012 -0400
frames: Add a multiplier to increase the size of resize corners
Now the resize corners will extend into the actual border edges.
https://bugzilla.gnome.org/show_bug.cgi?id=677669
src/ui/frames.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index 3ec67c9..1988467 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -2177,6 +2177,7 @@ control_rect (MetaFrameControl control,
}
#define TOP_RESIZE_HEIGHT 4
+#define CORNER_SIZE_MULT 2
static MetaFrameControl
get_control (MetaFrames *frames,
MetaUIFrame *frame,
@@ -2264,8 +2265,8 @@ get_control (MetaFrames *frames,
* in case of overlap.
*/
- if (y >= (fgeom.height - fgeom.borders.total.bottom) &&
- x >= (fgeom.width - fgeom.borders.total.right))
+ if (y >= (fgeom.height - fgeom.borders.total.bottom * CORNER_SIZE_MULT) &&
+ x >= (fgeom.width - fgeom.borders.total.right * CORNER_SIZE_MULT))
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_SE;
@@ -2274,8 +2275,8 @@ get_control (MetaFrames *frames,
else if (has_horiz)
return META_FRAME_CONTROL_RESIZE_E;
}
- else if (y >= (fgeom.height - fgeom.borders.total.bottom) &&
- x <= fgeom.borders.total.left)
+ else if (y >= (fgeom.height - fgeom.borders.total.bottom * CORNER_SIZE_MULT) &&
+ x <= fgeom.borders.total.left * CORNER_SIZE_MULT)
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_SW;
@@ -2284,8 +2285,8 @@ get_control (MetaFrames *frames,
else if (has_horiz)
return META_FRAME_CONTROL_RESIZE_W;
}
- else if (y < (fgeom.borders.invisible.top) &&
- x <= fgeom.borders.total.left && has_north_resize)
+ else if (y < (fgeom.borders.invisible.top * CORNER_SIZE_MULT) &&
+ x <= (fgeom.borders.total.left * CORNER_SIZE_MULT) && has_north_resize)
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_NW;
@@ -2294,8 +2295,8 @@ get_control (MetaFrames *frames,
else if (has_horiz)
return META_FRAME_CONTROL_RESIZE_W;
}
- else if (y < (fgeom.borders.invisible.top) &&
- x >= fgeom.width - fgeom.borders.total.right && has_north_resize)
+ else if (y < (fgeom.borders.invisible.top * CORNER_SIZE_MULT) &&
+ x >= (fgeom.width - fgeom.borders.total.right * CORNER_SIZE_MULT) && has_north_resize)
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_NE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]