Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugargame/canvas.py
diff options
context:
space:
mode:
authorWade Brainerd <wadetb@gmail.com>2009-11-21 17:25:36 (GMT)
committer Wade Brainerd <wadetb@gmail.com>2009-11-21 17:25:36 (GMT)
commit47927d48d37fb2bb9fc6e2b29e5ee724652eebb3 (patch)
tree6ae1c1bb92164b6a578d1f0e9ab4f643d97bf076 /sugargame/canvas.py
parent7f8f78bfbce3406981c203c878a892e1065e4e4d (diff)
Better solution to the initial screen size.
Diffstat (limited to 'sugargame/canvas.py')
-rw-r--r--sugargame/canvas.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sugargame/canvas.py b/sugargame/canvas.py
index 27f9137..cf99a13 100644
--- a/sugargame/canvas.py
+++ b/sugargame/canvas.py
@@ -41,7 +41,8 @@ class PygameCanvas(gtk.EventBox):
self._socket.get_window().set_cursor(None)
# Initialize the Pygame window.
- pygame.display.set_mode((0, 0), pygame.RESIZABLE)
+ r = self.get_allocation()
+ pygame.display.set_mode((r.width, r.height), pygame.RESIZABLE)
# Hook certain Pygame functions with GTK equivalents.
translator = event.Translator(self._mainwindow, self)