Dear Tom
> I tried putting the "if" back, and although it fixed this issue, it
> introduced another one. I will take another look tomorrow.
Thanks ^^. Please fix this issue.
> Not correct at all, and should be fixed. I'm not sure I get you, do you
> have a solution or do you want me to check this out?
How about checking the range of wx,wy before it is saved in
"_smart_event_mouse_up"?
I made the patch and tested it. It worked well.
Please review below patch.
Index: src/lib/els_scroller.c
===================================================================
--- src/lib/els_scroller.c (revision 57040)
+++ src/lib/els_scroller.c (work copy)
@@ -1647,7 +1647,7 @@ _smart_event_mouse_up(void *data, Evas *e, Evas_Ob
{
Evas_Event_Mouse_Down *ev;
Smart_Data *sd;
- Evas_Coord x = 0, y = 0, ox = 0, oy = 0;
+ Evas_Coord x = 0, y = 0, ox = 0, oy = 0, cw = 0, ch = 0;
sd = data;
ev = event_info;
@@ -1840,15 +1840,20 @@ _smart_event_mouse_up(void *data, Evas *e, Evas_Ob
sd->down.want_dragged = 0;
sd->down.dragged = 0;
sd->down.now = 0;
+ elm_smart_scroller_child_viewport_size_get(sd->smart_obj,
&sd->ww, &sd->wh);
elm_smart_scroller_child_pos_get(sd->smart_obj, &x, &y);
elm_smart_scroller_child_pos_set(sd->smart_obj, x, y);
+ sd->pan_func.child_size_get(sd->pan_obj, &cw, &ch);
+ if (x < 0) x = 0;
+ else if ((x + sd->ww) > cw) x = cw - sd->ww;
+ if (y < 0) y = 0;
+ else if ((y + sd->wh) > ch) y = ch - sd->wh;
sd->wx = x;
sd->wy = y;
if(sd->is_mirrored)
sd->wx = _elm_smart_scroller_x_mirrored_get(sd->smart_obj,
sd->wx);
- elm_smart_scroller_child_viewport_size_get(sd->smart_obj,
&sd->ww, &sd->wh);
if (!_smart_do_page(sd))
bounce_eval(sd);
}
Thanks,
Jaehwan Kim.
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel