ensure ctrl+scrolling uses geometry inside the playlist area for finding an item

This commit is contained in:
zmike 2014-12-07 00:10:14 -05:00
parent c9646b679d
commit 50ca6c1301
1 changed files with 4 additions and 3 deletions

View File

@ -2825,11 +2825,12 @@ mouse_wheel(void *data EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mouse_Wheel *
if (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL)
{
Elm_Object_Item *it, *pit, *pick;
int w;
int x, y, w;
elm_scroller_region_get(queue_list, NULL, NULL, &w, NULL);
/* FIXME: this should actually calc the height of an item for y */
it = elm_genlist_at_xy_item_get(queue_list, w / 2, 5, NULL);
evas_object_geometry_get(queue_list, &x, &y, NULL, NULL);
/* FIXME: this should actually calc the height of an item for y */
it = elm_genlist_at_xy_item_get(queue_list, x + (w / 2), y + 2, NULL);
if (!it) return ECORE_CALLBACK_RENEW;
pit = elm_genlist_item_parent_get(it);
if (!pit) pit = it; //already parent