Peter Hutterer <[email protected]> writes: > Introduced in > 73698d41e41ce76bef2d9a90b46ac0c24ae148dd "Make XYToWindow a screen function" > > Moving the code into miwindow.c changed the start of the loop from > RootWindow()->firstChild to DeepestSpriteWindow(). The latter isn't the first > child of the root, but the deepest (furthest from the root window) window. > This window may have disappeared since, causing all sorts of invalid > reads/writes.
miSpriteTrace is exposed so that XWayland can set up a partial sprite
trace based on the Wayland event delivery and then have the regular code
follow the tree down to the deepest child. It won't ever be called
directly by a regular X server; the usual screen function is
miXYToWindow.
miXYToWindow sets pSprite->spriteTraceGood to 1 before calling
miSpriteTrace, so DeepestSpriteWin(pSprite) will always be pRoot.
> WindowPtr
> miSpriteTrace(SpritePtr pSprite, int x, int y)
> {
> - WindowPtr pWin;
> + WindowPtr pWin, pRoot;
> BoxRec box;
>
> - pWin = DeepestSpriteWin(pSprite);
> + pRoot = pSprite->spriteTrace[0];
> + pWin = pRoot->firstChild;
What you did find is that we aren't looping over the children of the
deepest sprite window, which is wrong. We should be doing
pWin = DeepestSpriteWin(pSprite)->firstChild;
With this, we're back to the previous behavior.
--
[email protected]
pgpfkDgDLDAHC.pgp
Description: PGP signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
