diff options
author | Daniel Stone <daniel@fooishbar.org> | 2011-01-18 20:16:36 +0000 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2011-05-03 01:46:35 +0100 |
commit | 706326491011be8cecb9b56c06f7241b7cbd425f (patch) | |
tree | e3b528d0cd7171f7f3cdb5d33db47cb2fd744cf3 /include | |
parent | 65b54548dce80c8e8ff5ff91fc4f0659e9b2d921 (diff) |
Input: Add DeepestSpriteWin function
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: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/inputstr.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/inputstr.h b/include/inputstr.h index bd7c78dec..bc0accc87 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -591,4 +591,14 @@ typedef struct _EventSyncInfo { extern EventSyncInfoRec syncEvents; +/** + * Given a sprite, returns the window at the bottom of the trace (i.e. the + * furthest window from the root). + */ +static inline WindowPtr DeepestSpriteWin(SpritePtr sprite) +{ + assert(sprite->spriteTraceGood > 0); + return sprite->spriteTrace[sprite->spriteTraceGood - 1]; +} + #endif /* INPUTSTRUCT_H */ |