changeset 347:0a2c686a8b14

Make modal containers affect the mouse too
author Stefano Rivera <stefano@rivera.za.net>
date Fri, 16 Sep 2011 23:18:33 +0200
parents c2f7920563e4
children ca2c98447453
files mamba/widgets/base.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mamba/widgets/base.py	Fri Sep 16 23:03:54 2011 +0200
+++ b/mamba/widgets/base.py	Fri Sep 16 23:18:33 2011 +0200
@@ -115,7 +115,8 @@
             for child in self.children[:]:
                 if child.rect.collidepoint(ev.pos):
                     if ev.type == MOUSEBUTTONDOWN and child.focussable:
-                        child.grab_focus()
+                        if not child.grab_focus():
+                            return False
                     if child.event(ev):
                         return True