It seems that the problem isn't the reparenting stuff. The attached
patch for SDL-1.2.14 worked for me.
If anyone is interested, here is what happens:
SDL creates two windows: FSwindow and WMwindow. FSwindow has the
override redirect flag set, and WMwindow is ment to be managed by the wm
for windowed mode. The actual drawing happens in SDL_Window. In windowed
mode the SDL_Window is a child of WMwindow. As soon as the app requests
full screen mode the SDL_Window is reparented into the FSwindow which
then stretches the whole screen.
The problem is that the WMwindow is also created and managed by dwm. As
soon as the screen resolution is changed, dwm raises the bar and restacks
all tiled windows (including the empty - thus black) WMwindow just below
the bar. Now all managed windows are above the FSwindow. This also
explains why full screen mode works when the resolution doesn't change,
since then the stacking order of the windows stays and FSwindow is still
on top.
Thinking about this, another way to fix this problem would be to
change all XRaiseWindow calls in dwm to restacking them just below the
bar and never raising the bar. That way dwm would play nicely with other
override redirect windows as well. I don't know if that would be worth
it.
--
Eckehard Berns
Received on Wed Jan 11 2012 - 18:30:55 CET