diff options
author | Fran Rogers <fran@dumetella.net> | 2010-02-11 23:17:15 (GMT) |
---|---|---|
committer | Fran Rogers <fran@dumetella.net> | 2010-02-11 23:17:15 (GMT) |
commit | 8e127bb952032be1a891b61eb0d5d3f65e30cc61 (patch) | |
tree | dc60f18726fb1faa09fc3c8a52254d9a32f1414d | |
parent | 80bfd8bbc4888f197e7d95594a4dde286eba457f (diff) |
Pump GTK messages if running in Sugar.
-rw-r--r-- | blocku.py | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -2,7 +2,10 @@ import pygame, random, os.path from pygame.locals import * from pygame import * -#import gtk + + +try: import gtk +except ImportError: gtk = None #see if we can load more than standard BMP if not pygame.image.get_extended(): @@ -148,8 +151,8 @@ class Game: while self.running: # Pump GTK messages. - #while gtk.events_pending(): - # gtk.main_iteration() + while gtk and gtk.events_pending(): + gtk.main_iteration() # Pump PyGame messages. for event in pygame.event.get(): |