efl/legacy/edje
SHILPA ONKAR SINGH 510cada94b From: SHILPA ONKAR SINGH <shilpa.singh@samsung.com>
Subject: [E-devel] [Edje]: Bug Fix: Edje draggable jumps when external
events is used.

Please find attached bug fix patch for edje draggable jump issue when
external event area is used.

Bug: When an external event area is used for edje draggable and when
after mouse move if immediate mouse down
is done then the draggable jumps back to its original position. 

Analysis: In  _edje_mouse_down_signal_cb  When an external event area
is set  i.e., when rp->events_to is set.  
tmp.x value is set to 0, need_reset is set to 1 and also
_edje_recalc_do is called including emitting "drag" signal. this code
is 
unnecessary/buggy  and instead it causes the jump.
1. In mouse down only drag->down.x and drag->down.y needs to be set
which is being set below and tmp value need not be reset to 
0 as tmp value is calculated in mouse move based on drag->down.x and
drag->down.y values.
2. need_reset is already set in mouse up hence need not be set in
mouse down again.
3. edje_recalc_do is the function which actually causes the movement
of draggable based on tmp value hence need not be called in mouse down.
because of the above code race condition happens and as tmp value is
being set to 0 and need reset is also enabled the draggable jumps back
to where it
started.
4. "drag": is sent even before "drag,start" [ should not /need not be
sent in mouse down ]
All the above code is added only when external event area is set and
the above code is not even related to whether external event is set or
not.

Solution: When an external event area is set directly equating rp =
rp->events_to and sending mouse,down would be enough, as down.x and
down.y is set below
including sending drag,start. Recalc_do should be called only in mouse
move as its responsible for movement including setting tmp value.
need_reset is already set in mouse up. drag should not be sent from
mouse down.


Change Description:
Bug Fix: Edje Draggable jumps when mouse down is done immediately
after mouse move when an external 
event area is used.

demo edc pasted below to reproduce the issue.
Please find attached bug fix patch for edje draggable jump issue when external event area is used.

Bug: When an external event area is used for edje draggable and when after mouse move if immediate mouse down
is done then the draggable jumps back to its original position. 

Analysis: In  _edje_mouse_down_signal_cb  When an external event area is set  i.e., when rp->events_to is set.  
tmp.x value is set to 0, need_reset is set to 1 and also _edje_recalc_do is called including emitting "drag" signal. this code is 
unnecessary/buggy  and instead it causes the jump.
1. In mouse down only drag->down.x and drag->down.y needs to be set which is being set below and tmp value need not be reset to 
0 as tmp value is calculated in mouse move based on drag->down.x and drag->down.y values.
2. need_reset is already set in mouse up hence need not be set in mouse down again.
3. edje_recalc_do is the function which actually causes the movement of draggable based on tmp value hence need not be called in mouse down.
because of the above code race condition happens and as tmp value is being set to 0 and need reset is also enabled the draggable jumps back to where it
started.
4. "drag": is sent even before "drag,start" [ should not /need not be sent in mouse down ]
All the above code is added only when external event area is set and the above code is not even related to whether external event is set or not.

Solution: When an external event area is set directly equating rp = rp->events_to and sending mouse,down would be enough, as down.x and down.y is set below
including sending drag,start. Recalc_do should be called only in mouse move as its responsible for movement including setting tmp value. need_reset is already set in mouse up. drag should not be sent from mouse down.


Change Description:
Bug Fix: Edje Draggable jumps when mouse down is done immediately after mouse move when an external 
event area is used.

demo edc pasted below to reproduce the issue.
Please find attached bug fix patch for edje draggable jump issue when
external event area is used.

Bug: When an external event area is used for edje draggable and when
after mouse move if immediate mouse down
is done then the draggable jumps back to its original position. 

Analysis: In  _edje_mouse_down_signal_cb  When an external event area
is set  i.e., when rp->events_to is set.  
tmp.x value is set to 0, need_reset is set to 1 and also
_edje_recalc_do is called including emitting "drag" signal. this code
is 
unnecessary/buggy  and instead it causes the jump.
1. In mouse down only drag->down.x and drag->down.y needs to be set
which is being set below and tmp value need not be reset to 
0 as tmp value is calculated in mouse move based on drag->down.x and
drag->down.y values.
2. need_reset is already set in mouse up hence need not be set in
mouse down again.
3. edje_recalc_do is the function which actually causes the movement
of draggable based on tmp value hence need not be called in mouse down.
because of the above code race condition happens and as tmp value is
being set to 0 and need reset is also enabled the draggable jumps back
to where it
started.
4. "drag": is sent even before "drag,start" [ should not /need not be
sent in mouse down ]
All the above code is added only when external event area is set and
the above code is not even related to whether external event is set or
not.

Solution: When an external event area is set directly equating rp =
rp->events_to and sending mouse,down would be enough, as down.x and
down.y is set below
including sending drag,start. Recalc_do should be called only in mouse
move as its responsible for movement including setting tmp value.
need_reset is already set in mouse up. drag should not be sent from
mouse down.


Change Description:
Bug Fix: Edje Draggable jumps when mouse down is done immediately
after mouse move when an external 
event area is used.

demo edc pasted below to reproduce the issue.

Please find attached bug fix patch for edje draggable jump issue when external event area is used.
  
  Bug: When an external event area is used for edje draggable and when after mouse move if immediate mouse down
is done then the draggable jumps back to its original position. 
  
  Analysis: In  _edje_mouse_down_signal_cb  When an external event area is set  i.e., when rp->events_to is set.  
  tmp.x value is set to 0, need_reset is set to 1 and also _edje_recalc_do is called including emitting "drag" signal. this code is 
unnecessary/buggy  and instead it causes the jump.
  1. In mouse down only drag->down.x and drag->down.y needs to be set which is being set below and tmp value need not be reset to 
0 as tmp value is calculated in mouse move based on drag->down.x and drag->down.y values.
  2. need_reset is already set in mouse up hence need not be set in mouse down again.
  3. edje_recalc_do is the function which actually causes the movement of draggable based on tmp value hence need not be called in mouse down.
  because of the above code race condition happens and as tmp value is being set to 0 and need reset is also enabled the draggable jumps back to where it
started.
  4. "drag": is sent even before "drag,start" [ should not /need not be sent in mouse down ]
All the above code is added only when external event area is set and the above code is not even related to whether external event is set or not.
  
  Solution: When an external event area is set directly equating rp = rp->events_to and sending mouse,down would be enough, as down.x and down.y is set below
including sending drag,start. Recalc_do should be called only in mouse move as its responsible for movement including setting tmp value. need_reset is already set in mouse up. drag should not be sent from mouse down.
  
  
  Change Description:
Bug Fix: Edje Draggable jumps when mouse down is done immediately after mouse move when an external 
event area is used.



SVN revision: 71277
2012-05-21 10:08:18 +00:00
..
data From: Prince Kumar Dubey <prince.dubey@samsung.com> 2011-11-04 12:18:13 +00:00
doc From: Jérôme Pinot <ngc891@gmail.com> 2012-04-27 10:34:49 +00:00
m4 Edje: improve compilation of examples (part1) 2012-02-19 23:00:41 +00:00
src From: SHILPA ONKAR SINGH <shilpa.singh@samsung.com> 2012-05-21 10:08:18 +00:00
utils Fix indentation levels. 2008-09-16 21:11:38 +00:00
.gitignore edje: Add edje_watch to gitignore 2012-05-10 21:25:34 +00:00
AUTHORS From: Rajeev Ranjan <rajeev.r@samsung.com> 2012-05-13 04:24:28 +00:00
COPYING fix copying for edje to be explicit about epp. 2011-11-15 11:47:53 +00:00
ChangeLog From: SHILPA ONKAR SINGH <shilpa.singh@samsung.com> 2012-05-21 10:08:18 +00:00
INSTALL update svn:ignores 2011-07-24 21:49:49 +00:00
Makefile.am Edje: Stop deleting important m4 files on make maintainer-clean. These 2011-10-04 15:17:51 +00:00
NEWS edje: reduce memcpy in edje_cc by using Eina_File. 2012-05-20 07:06:57 +00:00
README gear up svn for release. one of many steps/things to do. 2012-03-17 04:17:29 +00:00
autogen.sh that's it - remove autom4te.cache dirs again... - keep having to many 2011-08-02 04:13:33 +00:00
configure.ac Edje: do not fail if eio is not available (edje_watch is compiled only if eio is available) 2012-05-10 17:49:53 +00:00
edje.pc.in add back in libs.private/requires to pc files with some fixes for 2012-03-17 05:37:25 +00:00
edje.spec.in Minor adjustments to the current status. 2011-12-10 11:26:31 +00:00
edje.supp added valgrind suppression file for Edje 2004-01-17 23:53:57 +00:00

README

Edje 1.2.0

******************************************************************************

 FOR ANY ISSUES PLEASE EMAIL:
 enlightenment-devel@lists.sourceforge.net

******************************************************************************

Requirements:
-------------

Must:
  libc
  eet (at least 1.5.0)
  ecore (at least 1.1.0)
  ecore-evas (at least 1.1.0)
  ecore-file (at least 1.1.0)
  embryo (at least 1.1.0)
  evas (at least 1.1.0)
For audio support (disabled - you have to patch to enable):
  remix - https://github.com/kfish/remix
  libsndfile (at least 1.0.22)
  libvorbis
  libogg
  libflac
  libasound (alsa)

Edje is a graphical layout and animation library for animated resizable,
compressed and scalable themes. It is meant to abstract UI from the
programmer to make it possible to plug in any replacement look at feel
that can be generated any time after an application or library has
already been developed, thus allowing full flexibility of look and
feel without having to involve the software developers.

------------------------------------------------------------------------------
COMPILING AND INSTALLING:

  ./configure
  make
(as root unless you are installing in your users directories):
  make install