Issue #129 resolved

VIDEORESIZE not generated when returning to default display size

Anonymous created an issue

Tested in both Python 2.6 and 2.7, on both Windows XP Professional x86 and Windows 7 Ultimate x64.

When using the RESIZABLE flag with a Pygame display, while a VIDEORESIZE event is generated when resizing or altering the window, it doesn't generate one again if for any reason it's changed back to the size it started with (whether going back to normal from a maximize operation or simply altering the window back to its normal dimensions).

Here's an example piece of code to show you what I mean:

{{{

!python

import pygame

pygame.display.init() pygame.display.set_mode((640, 480), pygame.RESIZABLE)

pygame.event.set_allowed(None) pygame.event.set_allowed([pygame.VIDEORESIZE, pygame.QUIT])

running = True

while running: for i in pygame.event.get(): print i if i.type == pygame.QUIT: running = False pygame.display.flip()

pygame.quit() }}}

My current project uses an OpenGL viewport that adjusts its projection whenever the window size changes, so having no event for when it goes back to normal is a bit of a problem.

Comments (1)

  1. Log in to comment