From d7ac9aff061f2961e6b76557dda97b57988ce362 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 30 Apr 2014 10:55:26 +1000 Subject: [PATCH] mi: start calculating the sprite trace from the first child of root 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(). 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 Reviewed-by: Keith Packard --- mi/miwindow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mi/miwindow.c b/mi/miwindow.c index 951b8c519..57de91bab 100644 --- a/mi/miwindow.c +++ b/mi/miwindow.c @@ -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)) &&