mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-25 21:02:21 +00:00
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>
This commit is contained in:
parent
65b54548dc
commit
7063264910
2 changed files with 12 additions and 2 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue