diff options
-rw-r--r-- | activity.py | 6 | ||||
-rw-r--r-- | physics.py | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/activity.py b/activity.py index e54bbd1..b61d732 100644 --- a/activity.py +++ b/activity.py @@ -159,7 +159,7 @@ class PhysicsActivity(activity.Activity): self.radioList[button] = c.name def stop_play_cb(self, button): - pygame.event.post(sugargame.eventwrap.Event(pygame.USEREVENT, + pygame.event.post(pygame.event.Event(pygame.USEREVENT, action="stop_start_toggle")) self.stop_play_state = not self.stop_play_state # Update button @@ -171,8 +171,8 @@ class PhysicsActivity(activity.Activity): self.stop_play.set_tooltip(_("Start")) def radioClicked(self, button): - pygame.event.post(sugargame.eventwrap.Event(pygame.USEREVENT, - action=self.radioList[button])) + pygame.event.post(pygame.event.Event(pygame.USEREVENT, + action=self.radioList[button])) def _focus_event(self, event, data=None): """Send focus events to pygame to allow it to idle when in background. @@ -85,6 +85,9 @@ class PhysicsGame: | gtk.gdk.LEAVE_NOTIFY_MASK) while True: + while gtk.events_pending(): + gtk.main_iteration() + for event in pygame.event.get(): self.currentTool.handleEvents(event) |