diff --git a/kivy/uix/widget.py b/kivy/uix/widget.py index 70f11920c..2f04301be 100644 --- a/kivy/uix/widget.py +++ b/kivy/uix/widget.py @@ -68,7 +68,15 @@ class Widget(EventDispatcher): self.register_event_type('on_touch_up') self.register_event_type('on_draw') + # Before doing anything, ensure the windows exist. EventLoop.ensure_window() + + # Apply the existing arguments to our widget + for key, value in kwargs.iteritems(): + if hasattr(self, key): + setattr(self, key, value) + + # Create the default canvas self.canvas = Canvas() # Apply all the styles @@ -76,7 +84,6 @@ class Widget(EventDispatcher): - # # Collision #