简体   繁体   English

使用x11在坐标处获取窗口

[英]With x11 get window at coordinates

I want to get the top most window that is at position x and y. 我想获得位于位置x和y的最上面的窗口。 In Winapi I do this with WindowFromPoint seen here: https://msdn.microsoft.com/en-us/library/ms633558%28v=vs.85%29.aspx 在Winapi中,我使用此处显示的WindowFromPoint此操作: https ://msdn.microsoft.com/zh-cn/library/ms633558%28v=vs.85%29.aspx

Is there any equivalent in x11? x11中有什么等效功能吗? I have covered the entire screen with a window and i want to know all the windows that are at the point in z order. 我已经用一个窗口覆盖了整个屏幕,我想知道所有按z顺序排列的窗口。

XQueryTree gives list of window in the stacking order. XQueryTree按堆叠顺序给出窗口列表。 You would need to query dimensions for every window in the list and stop when your point is within rectangle 您将需要查询列表中每个窗口的尺寸,并在点位于矩形内时停止

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM