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 1316

Summary: Resizing SDL window misbehavior on IceWM
Product: SDL Reporter: nfxjfg
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED WONTFIX QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2    
Version: 1.2.14   
Hardware: All   
OS: Linux   
Attachments: Simple test program.

Description nfxjfg 2011-10-19 12:00:11 UTC
Resizing a simple SDL window can trigger a strange misbehavior: after resizing the window with the mouse and having the program call SDL_SetVideoMode, SDL will send the program a bogus SDL_VIDEORESIZE event with the old size. This will throw the program into an infinite resize cycle, alternating the window size between the previous and new size in quick succession.

I suspect this is a bug that only happens on IceWM, as I couldn't reproduce it with another window manager (fluxbox). I observed this bug with IceWM 1.3.7.
Comment 1 nfxjfg 2011-10-19 12:01:22 UTC
Created attachment 718 [details]
Simple test program.
Comment 2 nfxjfg 2011-10-19 12:02:11 UTC
I also should mention that this doesn't happen if you don't pass the SDL_OPENGL flag.
Comment 3 Sam Lantinga 2011-12-29 01:51:31 UTC
Do you have a patch to fix this issue?
Comment 4 nfxjfg 2011-12-29 02:17:20 UTC
Unfortunately not.

All I can add is describing the workaround: that clearing out all SDL_VIDEORESIZE events from the event queue right after SDL_SetVideoMode made this behavior go away, but also lost some legit events.
Comment 5 Sam Lantinga 2011-12-29 02:51:10 UTC
I'm really hesitant to change the X11 event processing at this point, since it's really delicate code and I don't want to introduce other bugs.

I'll close this for now, but if you come up with a good fix, please let me know!