aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/include/inputstr.h
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/include/inputstr.h')
-rw-r--r--xorg-server/include/inputstr.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/xorg-server/include/inputstr.h b/xorg-server/include/inputstr.h
index 80e8ad8c7..ecbc6e09e 100644
--- a/xorg-server/include/inputstr.h
+++ b/xorg-server/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 */