I know there is a function named windowFromPoint in the API of Windows, I wonder if there is a counterpart for ubuntu/gnome? I’m not very familiar with the window manager of linux, can someone show me the right direction?
Thanks very much!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is likely going to be harder than you’d expect. The library you need to work with is Xlib, not GTK (after all, your desktop could have GTK and QT windows open). The function you’ll want to call, I think, is XQueryPointer. And I think you’ll need to use GDK to get a reference to the underlying X server connection, though I’m not really familiar with either Xlib or GDK.