touch up event and Popup

Affichage de 11 messages sur 1
touch up event and Popup mpad 24/01/12 05:43
Hi,

I think there might be a pbm with the Popup class : it doesn't redefine the on_touch_up (and on touch_move) events and let the widgets below react to these events.

See as example :

    class MyButton(Button):
        def on_touch_up(self, *l):
            print 'touch_up ',self.text
            return super(MyButton,self).on_touch_up(*l)
        def on_touch_down(self, *l):
            print 'touch_down ',self.text
            return super(MyButton,self).on_touch_down(*l)

    b1 = MyButton(text='b1')
    b2 = MyButton(text='b2')

    popup = Popup(title='bla', content=Label(text=' poppup '), size_hint=(0.5,0.5))

    b1.bind(on_press=popup.open)

    layout = BoxLayout(orientation='vertical')

    layout.add_widget(b1)
    layout.add_widget(b2)

    class MyApp(App):
        def build(self):
            return layout

    ap=MyApp()

    if __name__ == '__main__':
        ap.run()


1. click on b1 : the popup appears (and buttons touch_down messages are printed)
2. press on the popup :  no touch down messages (as expected), but touch_up messages are still there

I'd expect no widget, except those in the popup, receive the touch events (this is the case for touch_down). Am I wrong ?

cheers,

mpad