Page MenuHomePhabricator

Evas Events: Decrement grab count on freeze state
ClosedPublic

Authored by godlytalias on Jul 3 2019, 7:42 AM.

Details

Summary

Decrement grab count of mouse event when mouse up happen during a freeze state.
Currently as grab count is not reduced in this scenario, further touches gets ignored.

Signed-off-by: Godly T.Alias <godlytalias@yahoo.co.in>

Test Plan

(on scenario where proxy exists) mouse down -> freeze events -> mouse up -> unfreeze events

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.
godlytalias created this revision.Jul 3 2019, 7:42 AM
godlytalias requested review of this revision.Jul 3 2019, 7:42 AM
zmike requested changes to this revision.Jul 8 2019, 7:21 AM
zmike added a subscriber: zmike.

This needs some work and more testing. I've created an example unit test for this functionality; please add another test to verify the exact issue that you are trying to resolve.

src/lib/evas/canvas/evas_events.c
1856

This crashes for any non-image object.

1861

This variable is never used.

1864

This could probably just be EINA_LIST_FREE since it doesn't call any list-modifying operations in the loop.

1867

This variable is never used.

1869

This should be verified before attempting to iterate on the children.

1870

If child->delete_me is set then this should probably be skipped?

This revision now requires changes to proceed.Jul 8 2019, 7:21 AM

Updating with the content of duplicate diff D9248, some code review changes also included

In D9214#170003, @zmike wrote:

This needs some work and more testing. I've created an example unit test for this functionality; please add another test to verify the exact issue that you are trying to resolve.

I will add the tests soon, basically touch lockup is happening in below scenario as grab count is not decremented properly

<mouse down> -> <proxy objects created & events freezed> -> <mouse up> -> <events unfreezed>
In the above flow grab is not reduced properly and the subsequent touches will get ignored.

zmike requested changes to this revision.Jul 10 2019, 5:51 AM

This patch does not apply. Also not all of my inline comments have been addressed.

This revision now requires changes to proceed.Jul 10 2019, 5:51 AM
godlytalias marked 3 inline comments as done.Jul 10 2019, 6:07 AM

Please find my comments

src/lib/evas/canvas/evas_events.c
1856

only on proxy this code will be applied, so it will be an image object

1864

eina list free is done at end of looping

1870

These procedures are same as the procedures done in _evas_event_source_mouse_up_events, do i have to add this check here?

zmike added inline comments.Jul 10 2019, 6:10 AM
src/lib/evas/canvas/evas_events.c
1864

I saw that, but if you used EINA_LIST_FREE then you could save a loop iteration.

1870

Hm I suppose this is fine.

Optimized usage of list iterator

zmike requested changes to this revision.Jul 11 2019, 5:58 AM

Great. But this patch does not apply to current master and needs rebasing.

This revision now requires changes to proceed.Jul 11 2019, 5:58 AM
godlytalias marked an inline comment as done.

Rebasing

zmike accepted this revision.Jul 12 2019, 5:45 AM

Looks good. I'll await the unit test.

This revision is now accepted and ready to land.Jul 12 2019, 5:45 AM
This revision was automatically updated to reflect the committed changes.