If we create a new offscreen surface (which I was not
talking about doing, I only said we have to recreate the primary (onscreen)
surface) with a different depth/format/etc than the original offscreen
surface, then we have effectively changed the X graphics mode and we would
need to use some sort of X extension to notify clients that all pixmaps and
visuals have been reset. If there is such an extension, I am not aware of
it.
I'm not familiar with DirectX nor the internal of X so maybe I used the
wrong words. I'm not actually talking of changing what the X server
think the screen resolution/depth is. But we can already have a
different resolution/depth for the visual than for the monitor, which
means that there is a conversion at some point when the depth doesn't
match. So why can't you just throw away everything that is after the
conversion? I would think that, at worst, if the conversion happens when
drawing into the offscreen surface, all the buffers would have to be
recreated and that X would just have to ask all X windows to redraw
their content in the new offscreen buffer.