summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2011-01-18 20:16:36 +0000
committerDaniel Stone <daniel@fooishbar.org>2011-01-24 08:38:55 +1000
commit2bd67d8d38109ac798ba4df149c3fd119231bd1e (patch)
treeb6ecb2c5d42405889d8132f22be558cd96fe726b /dix
parenta6469eecd5d3d6bf6e799653db785356e747868b (diff)
Input: Add DeepestSpriteWin macro
Does what it says on the box: returns the deepest child window in a given sprite's trace. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix')
-rw-r--r--dix/events.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dix/events.c b/dix/events.c
index 07f8b05ea..5f8ce39c8 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -2174,7 +2174,7 @@ MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents,
static Window FindChildForEvent(SpritePtr pSprite, WindowPtr event)
{
- WindowPtr w = pSprite->spriteTrace[pSprite->spriteTraceGood-1];
+ WindowPtr w = DeepestSpriteWin(pSprite);
Window child = None;
/* If the search ends up past the root should the child field be
@@ -2591,7 +2591,7 @@ XYToWindow(SpritePtr pSprite, int x, int y)
else
pWin = pWin->nextSib;
}
- return pSprite->spriteTrace[pSprite->spriteTraceGood-1];
+ return DeepestSpriteWin(pSprite);
}
/**