Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
moveresize.c
Log Message:
Smart resizing (by Josh Holtrop <[EMAIL PROTECTED]>).
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/moveresize.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- moveresize.c 15 Jul 2004 18:23:54 -0000 1.21
+++ moveresize.c 22 Jul 2004 16:11:43 -0000 1.22
@@ -294,7 +294,32 @@
Mode.resize_detail = 2;
if ((x >= w) && (y >= h))
Mode.resize_detail = 3;
+
+ /* The following four if statements added on 07/22/04 by Josh Holtrop.
+ * They allow strictly horizontal or vertical resizing when the
+ * cursor is towards the middle of an edge of a window. */
+ if ((abs(x - w) < (w >> 1)) && (y < (h >> 1)))
+ {
+ Mode.mode = MODE_RESIZE_V;
+ Mode.resize_detail = 0;
+ }
+ else if ((abs(x - w) < (w >> 1)) && (y > (h + (h >> 1))))
+ {
+ Mode.mode = MODE_RESIZE_V;
+ Mode.resize_detail = 1;
+ }
+ else if ((abs(y - h) < (h >> 1)) && (x < (w >> 1)))
+ {
+ Mode.mode = MODE_RESIZE_H;
+ Mode.resize_detail = 0;
+ }
+ else if ((abs(y - h) < (h >> 1)) && (x > (w + (w >> 1))))
+ {
+ Mode.mode = MODE_RESIZE_H;
+ Mode.resize_detail = 1;
+ }
break;
+
case MODE_RESIZE_H:
Mode.mode = hv;
x = Mode.x - ewin->x;
@@ -304,6 +329,7 @@
else
Mode.resize_detail = 1;
break;
+
case MODE_RESIZE_V:
Mode.mode = hv;
y = Mode.y - ewin->y;
@@ -314,6 +340,7 @@
Mode.resize_detail = 1;
break;
}
+
Mode.start_x = Mode.x;
Mode.start_y = Mode.y;
Mode.win_x = ewin->x;
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs