and my callback is called when the system goes to sleep and when it wakes up.
static void
on_DBUSresume(GDBusConnection *connection,
const gchar *sender_name, const gchar *object_path,
const gchar *interface_name, const gchar *signal_name,
GVariant *parameters, gpointer udata)
{
tGlobal *pGlobal= (tGlobal *)udata;
gboolean bState = g_variant_get_boolean(parameters);
// FWIU this boolean should be TRUE for sleeping and FALSE for wake
// but it always seems FALSE
if( !bState ) {
// doing the voodoo I do ...
}
}
From what I understand, the parameter should be TRUE when going to suspend and FALSE when waking; however, I get FALSE on both occasions.
Am I doing something wrong, or is my understanding of this signal incorrect. If so how can I get an indication of wake?