diff options
author | Wade Brainerd <wadetb@gmail.com> | 2009-11-21 17:25:36 (GMT) |
---|---|---|
committer | Wade Brainerd <wadetb@gmail.com> | 2009-11-21 17:25:36 (GMT) |
commit | 47927d48d37fb2bb9fc6e2b29e5ee724652eebb3 (patch) | |
tree | 6ae1c1bb92164b6a578d1f0e9ab4f643d97bf076 /sugargame/canvas.py | |
parent | 7f8f78bfbce3406981c203c878a892e1065e4e4d (diff) |
Better solution to the initial screen size.
Diffstat (limited to 'sugargame/canvas.py')
-rw-r--r-- | sugargame/canvas.py | 3 |
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) |