ResizeWindow and ChangeBorderWidth return values
airlied at gmail.com
Wed Jun 2 17:33:07 PDT 2010
So the previous fix stops clients from definitely crashing things by
resizing redirected windows above 32kx32k, however there is still a
problem with the whole what happens if we can't allocate the pixmap
for a redirected window, due to some other issue like alloc failure.
At the moment, both ResizeWindow and ChangeBorderWidth return void
back up the chains, so there is no way to rollback or notice if the
compReallocPixmap fails. I suspect if compReallocPixmap fails we end
up doing bad things by assuming the pixmap resizing has succeeded and
claiming the window is resized anyways.
Fixing this doesn't look like the sort of fun adventure I'd normally
like to be associated with, but if we could sort out what the hell we
should do, I could probably lend myself to writing the patch.
Maybe we could do the composite checks before the ActuallyDoSomething
in dix/window.c so we can fail before doing ConfigNotify and all the
other stuff. Because failing afterwards seems like a lot of work.
More information about the xorg-devel