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 - Event not generated when resizing
Summary: Event not generated when resizing
Status: RESOLVED DUPLICATE of bug 1430
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: don't know
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-07 08:41 UTC by Michael
Modified: 2013-06-13 04:08 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***