[pypy-svn] r34482 - pypy/dist/pypy/translator/tool/pygame

arigo at codespeak.net arigo at codespeak.net
Sat Nov 11 13:19:57 CET 2006


Author: arigo
Date: Sat Nov 11 13:19:56 2006
New Revision: 34482

Modified:
   pypy/dist/pypy/translator/tool/pygame/graphdisplay.py
Log:
Mac OS/X workaround.  After closing and re-opening the Pygame viewer, it
was resized to a height of 32 pixels.  This is due to a pair of bogus
VideoResize events that we receive, no clue why (probably the X11 window
manager being confused by windows of height 1).



Modified: pypy/dist/pypy/translator/tool/pygame/graphdisplay.py
==============================================================================
--- pypy/dist/pypy/translator/tool/pygame/graphdisplay.py	(original)
+++ pypy/dist/pypy/translator/tool/pygame/graphdisplay.py	Sat Nov 11 13:19:56 2006
@@ -634,8 +634,12 @@
         if self.peek(VIDEORESIZE):
             return
         # XXX sometimes some jerk are trying to minimise our window,
-        # discard such event
-        if event.size[1] == 5:
+        # discard such event (we see a height of 5 in this case).
+        # XXX very specific MacOS/X workaround: after resizing the window
+        # to a height of 1 and back, we get two bogus VideoResize events,
+        # for height 16 and 32.
+        # XXX summary: let's ignore all resize events with a height <= 32
+        if event.size[1] <= 32:
             return
         self.resize(event.size)
         self.must_redraw = True



More information about the Pypy-commit mailing list