summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-06-29 10:52:34 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-06-29 10:52:34 -0400
commit8fb9c91d8f1ba28ed98f8fc597c92e7f0dcf3140 (patch)
treec49f1d52e6b4d6680c6f8c38667754d8402e04b6
parent2c85f3b525685fd05f48857f2dce8b0bb8123cc8 (diff)
downloadefl-8fb9c91d8f1ba28ed98f8fc597c92e7f0dcf3140.tar.gz
elementary: Fix over-zealous optimization attempt
This is a fix for some over-zealous optimization attempt. Basically, we cannot optimize out multiple calls to ecore_wl2_window_input_get as the window can change in the for loop. @fix Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
-rw-r--r--src/lib/elementary/elm_cnp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c
index 8f34a0001e..a45ae514e8 100644
--- a/src/lib/elementary/elm_cnp.c
+++ b/src/lib/elementary/elm_cnp.c
@@ -3617,7 +3617,6 @@ _wl_dnd_drop(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
{
Ecore_Wl2_Event_Dnd_Drop *ev;
Ecore_Wl2_Window *win;
- Ecore_Wl2_Input *input;
Dropable *drop;
Eina_List *l;
@@ -3626,7 +3625,6 @@ _wl_dnd_drop(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
savedtypes.x = ev->x;
savedtypes.y = ev->y;
- input = ecore_wl2_window_input_get(win);
EINA_LIST_FOREACH(drops, l, drop)
{
if (drop->last.in)
@@ -3639,13 +3637,14 @@ _wl_dnd_drop(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
&wl_cnp_selection);
win = _wl_elm_widget_window_get(drop->obj);
- ecore_wl2_dnd_drag_get(input, drop->last.type);
+ ecore_wl2_dnd_drag_get(ecore_wl2_window_input_get(win),
+ drop->last.type);
return ECORE_CALLBACK_PASS_ON;
}
}
win = ecore_wl2_display_window_find(_elm_wl_display, ev->win);
- ecore_wl2_dnd_drag_end(input);
+ ecore_wl2_dnd_drag_end(ecore_wl2_window_input_get(win));
return ECORE_CALLBACK_PASS_ON;
}