From 342fa0da6e785e2af0cddc6316173a5a14fa9add Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Delsart Date: Thu, 26 Jan 2012 22:21:11 +0100 Subject: [PATCH 1/2] popup doesn't propagate touch_up/move events --- kivy/uix/popup.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kivy/uix/popup.py b/kivy/uix/popup.py index bbf8d4975..e46a2ee76 100644 --- a/kivy/uix/popup.py +++ b/kivy/uix/popup.py @@ -236,6 +236,14 @@ class Popup(FloatLayout): if self._window: self.center = self._window.center + def on_touch_move(self, touch): + super(Popup, self).on_touch_move(touch) # progate to content + return True # stop propagation to widgets outside the popup + + def on_touch_up(self, touch): + super(Popup, self).on_touch_up(touch) + return True # stop propagation to widgets outside the popup + def on_touch_down(self, touch): if not self.collide_point(*touch.pos): if self.auto_dismiss: From 701e9860873c373f6053b7dd713155b295527d9f Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Sat, 28 Jan 2012 15:51:50 +0100 Subject: [PATCH 2/2] remove comment and ordering. --- kivy/uix/popup.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/kivy/uix/popup.py b/kivy/uix/popup.py index e46a2ee76..0ed25297f 100644 --- a/kivy/uix/popup.py +++ b/kivy/uix/popup.py @@ -236,14 +236,6 @@ class Popup(FloatLayout): if self._window: self.center = self._window.center - def on_touch_move(self, touch): - super(Popup, self).on_touch_move(touch) # progate to content - return True # stop propagation to widgets outside the popup - - def on_touch_up(self, touch): - super(Popup, self).on_touch_up(touch) - return True # stop propagation to widgets outside the popup - def on_touch_down(self, touch): if not self.collide_point(*touch.pos): if self.auto_dismiss: @@ -252,6 +244,14 @@ class Popup(FloatLayout): super(Popup, self).on_touch_down(touch) return True + def on_touch_move(self, touch): + super(Popup, self).on_touch_move(touch) + return True + + def on_touch_up(self, touch): + super(Popup, self).on_touch_up(touch) + return True + def on__anim_alpha(self, instance, value): if value == 0 and self._window is not None: self._window.remove_widget(self)