Web · Wiki · Activities · Blog · Lists · Chat · Meeting · Bugs · Git · Translate · Archive · People · Donate

Commit 47927d48d37fb2bb9fc6e2b29e5ee724652eebb3

Better solution to the initial screen size.
README.txt
(2 / 0)
  
9696 for event in pygame.event.get():
9797 if event.type == pygame.QUIT:
9898 return
99 elif event.type == pygame.VIDEORESIZE:
100 pygame.display.set_mode(event.size, pygame.RESIZABLE)
99101
100102 # Clear Display
101103 screen.fill((255,255,255)) #255 for white
  
4141 self._socket.get_window().set_cursor(None)
4242
4343 # Initialize the Pygame window.
44 pygame.display.set_mode((0, 0), pygame.RESIZABLE)
44 r = self.get_allocation()
45 pygame.display.set_mode((r.width, r.height), pygame.RESIZABLE)
4546
4647 # Hook certain Pygame functions with GTK equivalents.
4748 translator = event.Translator(self._mainwindow, self)
  
6969 self._inner_evb.connect('motion-notify-event', self._mousemove_cb)
7070 self._inner_evb.connect('expose-event', self._expose_cb)
7171 self._inner_evb.connect('configure-event', self._resize_cb)
72
73 # Fake the first VIDEORESIZE event to set the initial screen dimensions.
74 r = self._inner_evb.get_allocation()
75 evt = pygame.event.Event(pygame.VIDEORESIZE,
76 size=(r.width,r.height), width=r.width, height=r.height)
77 pygame.event.post(evt)
7872
7973 # Internal data
8074 self.__stopped = False