Window maximize bug with SDL in KDE

I have this bug with both the SDL that came with RedHat 7.1 and the head of
SDL12 from CVS under the KDE (2.1.1) that came with RedHat 7.1. It does
not occur that I’ve seen with GNOME in RedHat 7.1.

When I maximize my OpenGL SDL window, the window becomes the correct size,
but it does not get repositioned to 0,0 on the screen as should happen; it
stays where the top-left corner was before maximizing it. All SDL apps and
demos I’ve run into have this behavior.

I poked around the source a bit and what seems to be causing it is the main
window resize call in X11_ResizeWindow: “XResizeWindow(SDL_Display,
WMwindow, w, h);”. The sequence of events seem to go something like this:
I click maximize and the window manager correctly resizes the window. SDL
sends the app a resize event and the app calls SDL_SetVideoMode in response
to get SDL to update its surface info to work with the new window size.
The X11_ResizeWindow is called internally and resizes the window that is
already the correct size to the size specified in the resize event. At
this point, the window is moved back to its original location by the window
manager (but with the size it was when maximized so it no longer fits on
the screen) and the maximize indicator in the titlebar no longer indicates
the window is maximized.

Commenting out the “XResizeWindow(SDL_Display, WMwindow, w, h);” line
causes things to work as they should.

I don’t know enough about X11 window managers to know if this is a kwin bug
or a SDL bug.