forked from enlightenment/efl
panel, segment_control: Use ev->canvas instead of ev->output.
Even they are same it is recommended to use ev->canvas as it was actually intended for that purpose.
This commit is contained in:
parent
3559ee2f44
commit
fc41978cc2
|
@ -629,8 +629,8 @@ _event_mouse_up(void *data,
|
||||||
Evas_Coord x, y, up_x, up_y, minw = 0, minh = 0;
|
Evas_Coord x, y, up_x, up_y, minw = 0, minh = 0;
|
||||||
evas_object_geometry_get(data, &x, &y, NULL, NULL);
|
evas_object_geometry_get(data, &x, &y, NULL, NULL);
|
||||||
|
|
||||||
up_x = ev->output.x - x;
|
up_x = ev->canvas.x - x;
|
||||||
up_y = ev->output.y - y;
|
up_y = ev->canvas.y - y;
|
||||||
|
|
||||||
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
|
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
|
||||||
|
|
||||||
|
@ -650,8 +650,8 @@ _on_mouse_down(void *data,
|
||||||
Evas_Coord x, y, w, h;
|
Evas_Coord x, y, w, h;
|
||||||
evas_object_geometry_get(obj, &x, &y, &w, &h);
|
evas_object_geometry_get(obj, &x, &y, &w, &h);
|
||||||
|
|
||||||
sd->down_x = ev->output.x - x;
|
sd->down_x = ev->canvas.x - x;
|
||||||
sd->down_y = ev->output.y - y;
|
sd->down_y = ev->canvas.y - y;
|
||||||
|
|
||||||
// if freeze state & mouse down on the edge
|
// if freeze state & mouse down on the edge
|
||||||
// then set timer for un-freeze
|
// then set timer for un-freeze
|
||||||
|
|
|
@ -349,7 +349,7 @@ _on_mouse_up(void *data,
|
||||||
ev = event_info;
|
ev = event_info;
|
||||||
evas_object_geometry_get(VIEW(it), &x, &y, &w, &h);
|
evas_object_geometry_get(VIEW(it), &x, &y, &w, &h);
|
||||||
|
|
||||||
if ((ev->canvas.x >= x) && (ev->output.x <= (x + w)) && (ev->canvas.y >= y)
|
if ((ev->canvas.x >= x) && (ev->canvas.x <= (x + w)) && (ev->canvas.y >= y)
|
||||||
&& (ev->canvas.y <= (y + h)))
|
&& (ev->canvas.y <= (y + h)))
|
||||||
_segment_on(it);
|
_segment_on(it);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue