[PATCH] Return BadWindow instead of BadMatch from dixLookupWindow
Julien Cristau
jcristau at debian.org
Sat Jun 5 11:25:08 PDT 2010
On Sat, Jun 5, 2010 at 16:41:42 +0200, Julien Cristau wrote:
> From: Ben Hutchings <ben at decadent.org.uk>
>
> BadMatch is not a documented error code for XGetWindowProperty which
> sends X_GetProperty requests. However, the implementation in Xorg
> appears to return BadMatch if and only if it's passed a reference to a
> drawable that isn't a window.
>
> I don't understand how the server coordinates window changes with the
> WM. Is it possible that a window can be completely deleted before the
> WM has handled it? In that case there is presumably a race condition
> where a window could disppear and another drawable be created with the
> same id.
>
> I would suggest the following change. This is untested because the
> BadWindow or BadMatch error is dependent on a race condition if I
> understand correctly. But it's "obviously correct". :-)
>
> Debian bug#491979 <http://bugs.debian.org/491979>
> ---
> Ben sent this patch to the Debian bug in 2008, but this seems to still
> apply to the current code. The initial report was a ion3 crash because
> it got unexpected BadMatch errors from XGetWindowProperty.
>
Disregard this, the bug was already fixed in commit f04fe06ae24. Sorry
for the noise.
http://cgit.freedesktop.org/xorg/xserver/commit?id=f04fe06ae244b851b38be824b1a80f2f8a030591
Cheers,
Julien
More information about the xorg-devel
mailing list