Does xlib have an active window event?
问题 I am trying to write a program that tracks when the active window changes using Xlib. I am have trouble figuring out the best way to do this. These are my ideas so far: Every second use _NET_ACTIVE_WINDOW to get the active window and if it has changed then running the related code for the event. Get a list of all windows and listen to their focus in event. I would have to figure out how to keep an up to date list of open windows though. Is their an easier/better way? I am new to programming