Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_border.c
Log Message:
fix another bug - move started while resizienand vice-versa is bad. disallow.
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.593
retrieving revision 1.594
diff -u -3 -r1.593 -r1.594
--- e_border.c 10 Jun 2007 04:21:05 -0000 1.593
+++ e_border.c 10 Jun 2007 04:39:51 -0000 1.594
@@ -2421,21 +2421,19 @@
E_OBJECT_CHECK(bd);
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
if (bd->lock_user_location) return;
- if (!bd->moving)
+ if ((bd->resize_mode != RESIZE_NONE) || (bd->moving)) return;
+ if (!_e_border_move_begin(bd))
+ return;
+
+ e_zone_flip_win_disable();
+ bd->moving = 1;
+ _e_border_pointer_move_begin(bd);
+ if (ev)
{
- if (!_e_border_move_begin(bd))
- return;
-
- e_zone_flip_win_disable();
- bd->moving = 1;
- _e_border_pointer_move_begin(bd);
- if (ev)
- {
- char source[256];
-
- snprintf(source, sizeof(source) - 1, "mouse,down,%i", ev->button);
- _e_border_moveinfo_gather(bd, source);
- }
+ char source[256];
+
+ snprintf(source, sizeof(source) - 1, "mouse,down,%i", ev->button);
+ _e_border_moveinfo_gather(bd, source);
}
}
@@ -2458,45 +2456,43 @@
E_OBJECT_CHECK(bd);
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
if (bd->lock_user_size) return;
- if (bd->resize_mode == RESIZE_NONE)
+ if ((bd->resize_mode != RESIZE_NONE) || (bd->moving)) return;
+ if (!_e_border_resize_begin(bd))
+ return;
+ if (bd->mouse.current.mx < (bd->x + bd-> w / 2))
{
- if (!_e_border_resize_begin(bd))
- return;
- if (bd->mouse.current.mx < (bd->x + bd-> w / 2))
+ if (bd->mouse.current.my < (bd->y + bd->h / 2))
{
- if (bd->mouse.current.my < (bd->y + bd->h / 2))
- {
- bd->resize_mode = RESIZE_TL;
- GRAV_SET(bd, ECORE_X_GRAVITY_SE);
- }
- else
- {
- bd->resize_mode = RESIZE_BL;
- GRAV_SET(bd, ECORE_X_GRAVITY_NE);
- }
+ bd->resize_mode = RESIZE_TL;
+ GRAV_SET(bd, ECORE_X_GRAVITY_SE);
}
else
{
- if (bd->mouse.current.my < (bd->y + bd->h / 2))
- {
- bd->resize_mode = RESIZE_TR;
- GRAV_SET(bd, ECORE_X_GRAVITY_SW);
- }
- else
- {
- bd->resize_mode = RESIZE_BR;
- GRAV_SET(bd, ECORE_X_GRAVITY_NW);
- }
+ bd->resize_mode = RESIZE_BL;
+ GRAV_SET(bd, ECORE_X_GRAVITY_NE);
}
- _e_border_pointer_resize_begin(bd);
- if (ev)
+ }
+ else
+ {
+ if (bd->mouse.current.my < (bd->y + bd->h / 2))
{
- char source[256];
-
- snprintf(source, sizeof(source) - 1, "mouse,down,%i", ev->button);
- _e_border_moveinfo_gather(bd, source);
+ bd->resize_mode = RESIZE_TR;
+ GRAV_SET(bd, ECORE_X_GRAVITY_SW);
+ }
+ else
+ {
+ bd->resize_mode = RESIZE_BR;
+ GRAV_SET(bd, ECORE_X_GRAVITY_NW);
}
}
+ _e_border_pointer_resize_begin(bd);
+ if (ev)
+ {
+ char source[256];
+
+ snprintf(source, sizeof(source) - 1, "mouse,down,%i", ev->button);
+ _e_border_moveinfo_gather(bd, source);
+ }
}
EAPI void
@@ -2864,6 +2860,7 @@
{
E_OBJECT_CHECK(bd);
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
+ if ((bd->resize_mode != RESIZE_NONE) || (bd->moving)) return;
if (!_e_border_move_begin(bd)) return;
bd->moving = 1;
_e_border_pointer_move_begin(bd);
@@ -2901,6 +2898,8 @@
E_OBJECT_CHECK(bd);
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
+
+ if ((bd->resize_mode != RESIZE_NONE) || (bd->moving)) return;
if (!_e_border_resize_begin(bd))
return;
if (!strcmp(dir, "tl"))
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs