Page MenuHomePhabricator

elm_gesture_layer: Arrange the logic for delete the target object in gesture cb.
ClosedPublic

Authored by CHAN on Fri, May 15, 12:19 AM.

Details

Summary

When the user receives the callback of gesture callback, erases the target object, the gesture layer is deleted.

The memory is may broken and performing unnecessary operations during the logic.

Test Plan

elementary_test -> gesture_layer2

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.
CHAN created this revision.Fri, May 15, 12:19 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added: https://phab.enlightenment.org/w/maintainers_reviewers/

CHAN requested review of this revision.Fri, May 15, 12:19 AM
CHAN updated this revision to Diff 30305.Fri, May 15, 12:22 AM

code indentation.

CHAN edited the summary of this revision. (Show Details)Fri, May 15, 12:25 AM
CHAN edited the test plan for this revision. (Show Details)
CHAN added reviewers: cedric, Hermet.
CHAN updated this revision to Diff 30343.Wed, May 20, 12:07 AM
This comment was removed by CHAN.
CHAN updated this revision to Diff 30344.Wed, May 20, 12:08 AM
This comment was removed by CHAN.
Harbormaster completed remote builds in B16786: Diff 30344.
bu5hm4n requested changes to this revision.Mon, May 25, 12:17 AM
bu5hm4n added a subscriber: bu5hm4n.

Mike started to add test code for gesture detect

src/lib/elementary/elm_gesture_layer.c
1149

Can you add docs here what need_reset does ?

1185

We now call that twice, I dont think that is needed ?

1197

I am actually not sure if this is correct here. Even if we do not have a target available here, we want to refeed the events in case no gesture matched the input (line 1208).

3820

I know its the same, but can you use EINA_FALSE here instead of a plain 0?

This revision now requires changes to proceed.Mon, May 25, 12:17 AM
CHAN updated this revision to Diff 30401.Mon, May 25, 11:36 PM
CHAN marked 4 inline comments as done.

Code fix to follow review

CHAN added a comment.Mon, May 25, 11:37 PM

@bu5hm4n thank you for ur review.

src/lib/elementary/elm_gesture_layer.c
1185

Oops, mistake.

1197

If the container widget has deleted in the gesture callback.
the refeed will happened but the evas grab count will be messed.

But now if we add ref count in event_process. this is will not happend i think.

bu5hm4n accepted this revision.Tue, May 26, 11:19 PM

That looks indeed better, do you have some test code where i can reproduce this issue ?

This revision is now accepted and ready to land.Tue, May 26, 11:19 PM
Closed by commit rEFL5ca1a8c8a7fe: elm_gesture_layer: Arrange the logic for delete the target object in gesture cb. (authored by Woochanlee <wc0917.lee@samsung.com>, committed by Marcel Hollerbach <mail@marcel-hollerbach.de>). · Explain WhyMon, Jun 1, 11:09 PM
This revision was automatically updated to reflect the committed changes.