[pygtk] [Fwd: detect the screensaver] [SOLVED]
Antoine Martin
antoine at nagafix.co.uk
Fri Sep 18 19:54:44 WST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Hi,
I eventually found this (using ctypes) which may help someone else:
http://thpinfo.com/2007/09/x11-idle-time-and-focused-window-in.html
This gives the idle time using XScreenSaverQueryInfo.
The state is always '3' which is a little odd.. so I still don't know if
the screen is locked or not, but at least I have something.
Cheers
Antoine
Antoine Martin wrote:
> Is there anything in pygtk that would allow me to detect when the
> screensaver is activated? (I have found a way for win32 using pywin32)
>
> Since I got no reply from xorg, does anyone here have any ideas?
> Here is the original email I sent to xorg mailing list:
>
>
> Hi,
>
> What is the official way of detecting when the screensaver is activated?
>
> I thought it might be the "_SCREENSAVER_STATUS" property of the root
> window so I tried running:
> while true; do xprop -root _SCREENSAVER_STATUS; done
> And then starting the screensaver with gnome-screensaver-command -l
>
> Nothing showed up. I must be missing something obvious.
> Is this documented anywhere?
>
> Cheers
> Antoine
>
> PS: apologies if this is not the correct list, I can't think of a better
> one.
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEAREKAAYFAkqzdQQACgkQGK2zHPGK1rso9ACaAp2pp7p79ADMa5hr1Ldx/t7y
HBcAn3r4vXvcgZvJaj8kOVcYT3JWB4Fj
=jJVh
-----END PGP SIGNATURE-----
More information about the pygtk
mailing list