Resizing problems

I ran into a strange issue just now. I have a form with an SDL frame on it. When I resize the SDL frame, it resizes correctly, but if I then tell it to render something, it just stays black. But then if I click the thing that was making it try to resize and render again, so that it won’t change size, it renders correctly.

I figured this had something to do with the SDL window needing to process a resize message from Windows, so I explicitly invoked Application.ProcessMessages, (a routine which makes the program run through the event queue,) and it got even stranger. Now it renders correctly when the SDL frame is becoming larger, but continues to exhibit glitchy behavior when it’s becoming smaller.

Now, looking at SDL_win32events.c, it appears that the only thing that it’s going to react to is WM_WINDOWPOSCHANGED, and all that does is fire off a couple of SDL events to the SDL event queue, which I’m not doing anything with. So does anyone have any idea what’s going on here?

I’m using the GL renderer, under Windows 7, in case that matters.

Nevermind. Turns out the resizing down was taking a different code path that didn’t get the ProcessMessages call. It’s working now.________________________________
From: @Mason_Wheeler (Mason Wheeler)
Subject: [SDL] Resizing problems

I ran into a strange issue just now. I have a form with an SDL frame on it. When I resize the SDL frame, it resizes correctly, but if I then tell it to render something, it just stays black. But then if I click the thing that was making it try to resize and render again, so that it won’t change size, it renders correctly.

I figured this had something to do with the SDL window needing to process a resize message from Windows, so I explicitly invoked Application.ProcessMessages, (a routine which makes the program run through the event queue,) and it got even stranger. Now it renders correctly when the SDL frame is becoming larger, but continues to exhibit glitchy behavior when it’s becoming smaller.

Now, looking at SDL_win32events.c, it appears that the only thing that it’s going to react to is WM_WINDOWPOSCHANGED, and all that does is fire off a couple of SDL events to the SDL event queue, which I’m not doing anything with. So does anyone have any idea what’s going on here?

I’m using the GL renderer, under Windows 7, in case that matters.