From c3a0f48828e5b4968908e084631be308f52f7f6b Mon Sep 17 00:00:00 2001 From: Thomas Hansen Date: Thu, 23 Aug 2012 12:02:49 -0500 Subject: [PATCH] fix issue #648: uix.screenmanager: dont propagate touch event sduriong transition --- kivy/uix/screenmanager.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/kivy/uix/screenmanager.py b/kivy/uix/screenmanager.py index 394104ca7..6a8933f96 100644 --- a/kivy/uix/screenmanager.py +++ b/kivy/uix/screenmanager.py @@ -224,7 +224,7 @@ class TransitionBase(EventDispatcher): None, read-only. ''' - is_active = BooleanProperty() + is_active = BooleanProperty(False) '''Indicate if the transition is currently active :data:`is_active` is a :class:`~kivy.properties.BooleanProperty`, default @@ -688,6 +688,21 @@ class ScreenManager(FloatLayout): continue child.pos = value + def on_touch_down(self, touch): + if self.transition.is_active: + return False + return super(ScreenManager, self).on_touch_down(touch) + + def on_touch_move(self, touch): + if self.transition.is_active: + return False + return super(ScreenManager, self).on_touch_move(touch) + + def on_touch_up(self, touch): + if self.transition.is_active: + return False + return super(ScreenManager, self).on_touch_up(touch) + if __name__ == '__main__': from kivy.app import App from kivy.uix.button import Button