raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=b515c747791061de99f46ec8af32baa487dd8820

commit b515c747791061de99f46ec8af32baa487dd8820
Author: Daniel Hirt <daniel.h...@samsung.com>
Date:   Mon Feb 17 21:34:59 2014 +0900

    els_cursor: Fix mouse_out changing cursor to wrong image
    
    Summary:
    Fixes a bug when having a mouse_out event from elm objects that had a 
cursor set to them.
    For example, Entry has a specific cursor set to it.
    The bug is observable in Entry Test, and in any other test that has anchors 
(markup) in the entry widget.
    Just take your mouse in an anchor, and out of it, to see that the entry now 
has the wrong cursor.
    
    The old way of handling this asssumed that the triggering object had an 
elm-parent.
    However, this is not the case for anchors.
    Instead, it was agreed that the simplest way was to determine if there is 
any elm object,
    with a cursor set to it, under the current mouse position.
    If one is found, then use the cursor assigned to it.
    Fixes T878.
    
    Reviewers: tasn, raster
    
    CC: raster, JackDanielZ
    
    Maniphest Tasks: T878
    
    Differential Revision: https://phab.enlightenment.org/D551
---
 src/lib/els_cursor.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/lib/els_cursor.c b/src/lib/els_cursor.c
index 733a4bc..d63bf06 100644
--- a/src/lib/els_cursor.c
+++ b/src/lib/els_cursor.c
@@ -209,10 +209,13 @@ _elm_cursor_set_hot_spots(Elm_Cursor *cur)
 }
 
 static void
-_elm_cursor_mouse_in(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_info EINA_UNUSED)
+_elm_cursor_mouse_in(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_info)
 {
    Elm_Cursor *cur = data;
 
+   Evas_Event_Mouse_In *ev = event_info;
+   if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
+
    if (cur->visible) return;
    evas_event_freeze(cur->evas);
    cur->visible = EINA_TRUE;
@@ -239,12 +242,15 @@ _elm_cursor_mouse_in(void *data, Evas *evas EINA_UNUSED, 
Evas_Object *obj EINA_U
 }
 
 static void
-_elm_cursor_mouse_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_info EINA_UNUSED)
+_elm_cursor_mouse_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_info)
 {
    Evas_Object *sobj_parent;
    Elm_Cursor *pcur = NULL;
    Elm_Cursor *cur = data;
 
+   Evas_Event_Mouse_Out *ev = event_info;
+   if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
+
    if (!cur->visible) return;
    evas_event_freeze(cur->evas);
    cur->visible = EINA_FALSE;

-- 


Reply via email to