Page MenuHomePhabricator

elm_gesture_layer: Use flag returned by gesture callbacks
ClosedPublic

Authored by prasoonsingh16 on Mar 20 2019, 4:32 AM.

Details

Summary

Instead of flag returned by gesture callbacks, always EVAS_EVENT_FLAG_NONE
flag was being used.

Test Plan

As event flag was not being appropriately updated, in some cases expected
behaviour was not seen.

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
prasoonsingh16 created this revision.Mar 20 2019, 4:32 AM
prasoonsingh16 requested review of this revision.Mar 20 2019, 4:32 AM
prasoonsingh16 edited the summary of this revision. (Show Details)
prasoonsingh16 edited the test plan for this revision. (Show Details)

Updated commit message

This looks like an obvious fix, but how can I check the results?
New API elementary_test (Gesture) does not seem to be working for me at this moment.
Old API elementary_test (Gesture Layer 1, 2 and 3) all seem to be working just fine without this patch.

I can give you one example. As you know, focus cycle tries to give focus on object which got "up" event, if "mouse,down/move" event on that object don't have ON_HOLD flag set.
Now, suppose there are two buttons, btn1 has focus and on btn2 gesture layer is attached, which returns ON_HOLD flag in "line" gesture start/move/end callback. So now, when line gesture happens on btn2 and mouse,up comes on btn2 when gesture finishes, focus should not go on btn2.
But as ON_HOLD return by callback is not actually set on event flag, focus goes to btn2 in above scenario.

I have made a sample of above scenario (/src/bin/elementary/test_button.c) and attached diff. You can check focus movement by doing line gesture over btn2 such that mouse up comes on btn2(Line gesture should end inside btn2).

shilpasingh accepted this revision.Mar 20 2019, 7:30 AM
This revision is now accepted and ready to land.Mar 20 2019, 7:30 AM
prasoonsingh16 requested review of this revision.Mar 20 2019, 7:33 AM
segfaultxavi accepted this revision.Mar 20 2019, 8:11 AM

Thanks a lot for a very detailed answer :)

This revision is now accepted and ready to land.Mar 20 2019, 8:11 AM

@segfaultxavi
Can you please land the change. I don't have permission.

This revision was automatically updated to reflect the committed changes.