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 48

Summary: missing SDL_VIDEORESIZE when window is restored from maximised window state
Product: SDL Reporter: JernejL <jernejcoder>
Component: eventsAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED WORKSFORME QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 1.2.9   
Hardware: x86   
OS: Windows (All)   

Description JernejL 2006-01-18 13:35:31 UTC
if a sdl window is maximized i get a SDL_VIDEORESIZE, but when it gets restored back to original size i get no SDL_VIDEORESIZE message, the window size changes when window is restored from maximized state.
Comment 1 Ryan C. Gordon 2006-01-27 11:23:16 UTC
Setting Sam as "QA Contact" on all bugs (even resolved ones) so he'll definitely be in the loop to any further discussion here about SDL.

--ryan.

Comment 2 Sam Lantinga 2006-01-31 10:54:52 UTC
Date: Wed, 19 Oct 2005 09:18:55 -0400 (EDT)
From: Andrew Corrigan <acorriga@cs.stevens.edu>
To: sdl@libsdl.org
Subject: [SDL] bug-report: SDL_VIDEORESIZE event not generated.

I noticed what appears to be a bug in SDL 1.2.9.0 in Windows (it was also
in the previous version).  There's a
particular case when I expect an SDL_VIDEORESIZE  event to be generated,
but it isn't.

The bug repro. app is here:
http://www.cs.stevens.edu/~acorriga/sdl.zip

Specifically the event is not generated if I maximize the window without
doing anything else, and then click 'restore down' (the button which
replaces 'maximize' when the window is maximized).  No event is generated
and hence my glViewport call isn't reached.  If I first resize the window
before I maximize and subsequently click 'restore down' an SDL_VIDEORESIZE
event is generated and my call to glViewport is reached.
Comment 3 Sam Lantinga 2006-01-31 10:57:54 UTC
This appears to work in CVS.  I tested it with testwm -resize
Comment 4 Ken Van Hoeylandt 2006-07-08 06:42:33 UTC
I have exactly the same problem, with SDL 1.2.10, so I'm pretty sure it isn't fixed...

Basically this is how it failes:
- Open app with SDL and OpenGL
(SDL_OPENGL | SDL_HWACCEL | SDL_HWPALETTE | SDL_RESIZABLE)
- Click maximize
- Click restore window size
- Restoring fails to call SDL_VIDEORESIZE

This is how it do
Comment 5 Ken Van Hoeylandt 2006-07-08 06:45:43 UTC
Sorry, forgot to select "Win32" as target OS. (and I don't seem to be able to edit my bug reports?)
Comment 6 Ryan C. Gordon 2007-02-16 02:18:30 UTC
Tried this with the latest Subversion on Windows (with windib, directx, OpenGL and otherwise) and it works.

You won't get a second resize event if you don't call SDL_SetVideoMode() on the first one, though.

--ryan.