[modules/touchring]Fix odd behaviour while kivy.modules.touchring is active #5924
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, I think
kivy.modules.touchring
has some issues.Issue 1
While
TouchRing
is active,on_touch_move
andon_touch_up
are doubled.This is because
_touch_move()
andtouch_up()
in the code below do not return True whentouch.grab_current is win
kivy/kivy/modules/touchring.py
Lines 59 to 76 in 267da41
Issue 2
If there is another module that does
touch.grab(window)
at the same time, the program behave unexpectedly.Rings don't disappear while switch is active.
In the first place, is
touch.grab(window)
safe? I don't think so because there is no guarantee thattouchring
is the only one who doestouch.grab(window)
. The argument oftouch.grab()
should be your own widget instance.