We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1539

Summary: Event not generated when resizing
Product: SDL Reporter: Michael <m.rochester93>
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED DUPLICATE QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: lekensteyn
Version: don't know   
Hardware: x86_64   
OS: Linux   

Description Michael 2012-07-07 08:41:44 UTC
====Orriginal Bug====


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:

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.
====Original Bug End====

We at pygame have tested and found that this is not an issue with pygame, but instead the SDL layer we use.
Comment 1 Peter Wu 2013-06-13 04:08:33 UTC
Symptomps of bug #1430

*** This bug has been marked as a duplicate of bug 1430 ***