xorg

How can I get the current mouse (pointer) position co-ordinates in X

时光总嘲笑我的痴心妄想 提交于 2019-11-27 14:57:01
问题 This can either be some sample C code or a utility that will show me either gui or on the console it doesn't matter, but I have to be able to "command" it to grab the co-ordinates at an exact time which makes xev not very useful (that I could figure out). 回答1: I'm not a C programmer by any means but I looked at a couple of online tutorials and think this is how you are supposed to read the current mouse position. This is my own code and I'd done nothing with Xlib before so it could be

How do I obtain, and synchronize, a complete list of all X11 windows?

独自空忆成欢 提交于 2019-11-27 10:02:28
问题 I want to monitor all the open windows under X11. Currently, I'm doing this as follows: Initially walking the whole tree by recursively calling XQueryTree from the root window Listening for substructure changes on the whole desktop: XSelectInput( display, root_window, SubstructureNotifyMask | PropertyChangeMask ) Handling all MapNotify, UnmapNotify and DestroyNotify events, updating my own list of windows in the process I'm mainly worried about point 1. During the recursion, XQueryTree will

Programmatically determining individual screen widths/heights in Linux (w/Xinerama, TwinView, and/or BigDesktop)

假如想象 提交于 2019-11-26 23:12:30
问题 I'm developing a little side-project to display multiple wallpapers on multiple screens under GNOME (something that apparently can't be done by GNOME itself or anything else). I've figured out how to do the main part of it (using the ImageMagick components, for the curious); I'm trying to automate the configuration system. To do that, I need a way to determine the dimensions of the individual screens are. Can anyone give me a hint where to look for that? I presume the X server itself has the