[PATCH] mi: start calculating the sprite trace from the first child of root
keithp at keithp.com
Wed Apr 30 09:57:44 PDT 2014
Peter Hutterer <peter.hutterer at who-t.net> 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
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 sets pSprite->spriteTraceGood to 1 before calling
miSpriteTrace, so DeepestSpriteWin(pSprite) will always be pRoot.
> miSpriteTrace(SpritePtr pSprite, int x, int y)
> - WindowPtr pWin;
> + WindowPtr pWin, pRoot;
> BoxRec box;
> - pWin = DeepestSpriteWin(pSprite);
> + pRoot = pSprite->spriteTrace;
> + 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.
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 810 bytes
Desc: not available
More information about the xorg-devel