Catching machine suspend events



Hi,

I have a service that runs a gtk main loop using g_main_loop_run(). I'd
like to know when the machine is about to be put into a suspend state,
ideally before the screen gets locked.

Are there any glib signals I can connect to for this? If not, should I
be using dbus to listen for org.freedesktop.UPower signals as described
here?:

https://stackoverflow.com/a/13548984

David
-- 
Website: http://www.flypig.co.uk


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]