使用 x11 在坐标处获取窗口 [英] With x11 get window at coordinates

查看:51
本文介绍了使用 x11 在坐标处获取窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获得位于 x 和 y 位置的最上面的窗口.在 Winapi 中,我使用此处看到的 WindowFromPoint 执行此操作:https://msdn.microsoft.com/en-us/library/ms633558%28v=vs.85%29.aspx

I want to get the top most window that is at position x and y. In Winapi I do this with WindowFromPoint seen here: https://msdn.microsoft.com/en-us/library/ms633558%28v=vs.85%29.aspx

x11 中是否有任何等价物?我用一个窗口覆盖了整个屏幕,我想知道在 z 顺序中的所有窗口.

Is there any equivalent in 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.

推荐答案

XQueryTree 按堆叠顺序给出窗口列表.您需要查询列表中每个窗口的尺寸,并在您的点位于矩形内时停止

XQueryTree gives list of window in the stacking order. You would need to query dimensions for every window in the list and stop when your point is within rectangle

这篇关于使用 x11 在坐标处获取窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆