mi: start calculating the sprite trace from the first child of root

Introduced in
73698d41e4 "Make XYToWindow a screen function"

Moving the code into miwindow.c changed the start of the loop from
RootWindow()->firstChild to DeepestSpriteWindow(). This function is only
supposed to be called from miXYToWindow which resets spriteTraceGood to 1,
thus DeepestSpriteWindow() is always the root window anyway.
What got dropped was the firstChild as the first window to handle, so we may
end up with the root window twice in the sprite trace.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Peter Hutterer 2014-04-30 10:55:26 +10:00 committed by Keith Packard
parent d60724b752
commit d7ac9aff06

View File

@ -766,7 +766,7 @@ miSpriteTrace(SpritePtr pSprite, int x, int y)
WindowPtr pWin;
BoxRec box;
pWin = DeepestSpriteWin(pSprite);
pWin = DeepestSpriteWin(pSprite)->firstChild;
while (pWin) {
if ((pWin->mapped) &&
(x >= pWin->drawable.x - wBorderWidth(pWin)) &&