billiob pushed a commit to branch master.
commit e710205122fb9a8b0e74064a2bb28ef986418039
Author: Boris Faure <[email protected]>
Date: Thu Aug 29 18:26:46 2013 +0200
try to fix some link/selection mess
---
src/bin/termio.c | 47 +++++++++++++++++++++++++++++++----------------
1 file changed, 31 insertions(+), 16 deletions(-)
diff --git a/src/bin/termio.c b/src/bin/termio.c
index b3b35fb..329aa1c 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -318,20 +318,21 @@ _cb_link_up(void *data, Evas *e EINA_UNUSED, Evas_Object
*obj EINA_UNUSED, void
{
Evas_Event_Mouse_Up *ev = event;
Termio *sd = evas_object_smart_data_get(data);
- Evas_Coord dx, dy;
-
if (!sd) return;
- dx = abs(ev->canvas.x - sd->link.down.x);
- dy = abs(ev->canvas.y - sd->link.down.y);
- if ((ev->button == 1) && (sd->link.down.down) &&
- ((dx <= elm_config_finger_size_get()) &&
- (dy <= elm_config_finger_size_get())))
- {
- if (sd->link_do_timer) ecore_timer_del(sd->link_do_timer);
- sd->link_do_timer = ecore_timer_add(0.2, _cb_link_up_delay, data);
- }
+
if ((ev->button == 1) && (sd->link.down.down))
{
+ Evas_Coord dx, dy, finger_size;
+
+ dx = abs(ev->canvas.x - sd->link.down.x);
+ dy = abs(ev->canvas.y - sd->link.down.y);
+ finger_size = elm_config_finger_size_get();
+
+ if ((dx <= finger_size) && (dy <= finger_size))
+ {
+ if (sd->link_do_timer) ecore_timer_del(sd->link_do_timer);
+ sd->link_do_timer = ecore_timer_add(0.2, _cb_link_up_delay, data);
+ }
sd->link.down.down = EINA_FALSE;
}
}
@@ -3137,7 +3138,8 @@ _smart_cb_mouse_move(void *data, Evas *e EINA_UNUSED,
Evas_Object *obj EINA_UNUS
}
static void
-_smart_cb_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj
EINA_UNUSED, void *event EINA_UNUSED)
+_smart_cb_mouse_in(void *data, Evas *e EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED, void *event)
{
int cx, cy;
Evas_Event_Mouse_In *ev = event;
@@ -3152,17 +3154,30 @@ _smart_cb_mouse_in(void *data, Evas *e EINA_UNUSED,
Evas_Object *obj EINA_UNUSED
static void
_smart_cb_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj,
- void *event EINA_UNUSED)
+ void *event)
{
Termio *sd;
+ Evas_Event_Mouse_Out *ev = event;
sd = evas_object_smart_data_get(data);
if (!sd) return;
termio_mouseover_suspend_pushpop(data, 1);
ty_dbus_link_hide();
- sd->mouse.cx = -1;
- sd->mouse.cy = -1;
- _remove_links(sd, obj);
+ if ((ev->canvas.x == 0) || (ev->canvas.y == 0))
+ {
+ sd->mouse.cx = -1;
+ sd->mouse.cy = -1;
+ sd->link.suspend = EINA_FALSE;
+ _remove_links(sd, obj);
+ }
+ else
+ {
+ int cx, cy;
+
+ _smart_xy_to_cursor(data, ev->canvas.x, ev->canvas.y, &cx, &cy);
+ sd->mouse.cx = cx;
+ sd->mouse.cy = cy;
+ }
}
static void
--
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk