From 50ca6c1301b78847518bd8377ff5153d593a2cc3 Mon Sep 17 00:00:00 2001 From: zmike Date: Sun, 7 Dec 2014 00:10:14 -0500 Subject: [PATCH] ensure ctrl+scrolling uses geometry inside the playlist area for finding an item --- src/bin/empc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/bin/empc.c b/src/bin/empc.c index e8f3a2c..7557f54 100644 --- a/src/bin/empc.c +++ b/src/bin/empc.c @@ -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