Check application visibility
What I'm wanting to do is if the screensaver kicks in or a full screen game is started I want my program to pause (sleep). Is this possible?
Alternatively, I'm wanting to be able to check if a particular applications window is visible to the user. Is there an application that can check that and return the result?
I've been doing some searching on google and the closest I've found is the below code (which is pygtk)....however this is to check an applications own visibility, not another applications visibility. Any help or direction much appreciated. I'm wanting something that can return the visibility status of any application...
To check if a gtk.Window is visible you can use the visible property inherited from gtk.Widget.
self.window =3D gtk.Window()