From 1185c40e508ca2ecc4c5e86ba28835b4e61f1c21 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Wed, 10 Aug 2016 16:29:17 +0900 Subject: [PATCH] evas: Call legacy events before new key/pointer eo events This affects pointer & key events. Here's the scenario: in Enventor, an elm_button object grabs the up & down keys for the autocompletion feature. But the entry will also listen to up & down to move the cursor. Moreover, the scroller listens to up & down arrow keys to scroll around. So, when calling the new eo event first, the scroller or the entry would catch it and do some action. In Enventor, this triggered a hide on the magic anchor object. Bad, bad. I fear something will be wrong with this order as well. Both events (legacy & eo) should be called simultaneously, following the order & priorities that were set. This being said, in real life most of EFL internals will move to the new eo events (right now elm relies on the new events, but edje doesn't, yet), so any app grabbing a key probably wants to handle the event before elm. Same for an app using focus manually. Fixes T4310 --- src/lib/evas/canvas/evas_callbacks.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c index 00a5e6270c..14e303fc31 100644 --- a/src/lib/evas/canvas/evas_callbacks.c +++ b/src/lib/evas/canvas/evas_callbacks.c @@ -262,6 +262,9 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data break; } + /* legacy callbacks - relying on Efl.Canvas.Object events */ + eo_event_callback_call(eo_obj, _legacy_evas_callback_table(type), event_info); + /* new input events */ if (eo_event_desc) { @@ -290,12 +293,8 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data if (pevflags) efl_event_flags_set(eo_event_info, *pevflags); eo_event_callback_call(eo_obj, eo_event_desc, eo_event_info); - if (pevflags) *pevflags = efl_event_flags_get(eo_event_info); } - /* legacy callbacks - relying on Efl.Canvas.Object events */ - eo_event_callback_call(eo_obj, _legacy_evas_callback_table(type), event_info); - if (type == EVAS_CALLBACK_MOUSE_DOWN) { Evas_Event_Mouse_Down *ev = event_info;