def on_touch_up(self, touch):
        if touch.grab_current is not self:
            return
        touch.ungrab(self)

        g = self.get_gesture(touch)
        g.complete_stroke()

        # If this stroke hit the maximum limit, dispatch immediately
        if not g.accept_stroke():
            self._complete_dispatcher(0)

        # dispatch later only if we have a window
        elif self.temporal_window > 0:
            Clock.schedule_once(self._complete_dispatcher, self.temporal_window)

# -----------------------------------------------------------------------------
# Gesture related methods
# -----------------------------------------------------------------------------
dataset/ETHPy150Open kivy/kivy/kivy/uix/gesturesurface.py/GestureSurface.on_touch_up/original