fp-image-device: Reactivate in idle on deactivation completed
This is the same logic we apply to fp-device by default: any completed action should trigger the subsequent one when it is finished. So in case we want reactivate after a deactivation, let's do it in an idle, after removing the current pending timeout.
This commit is contained in:
parent
60ad1ab9e3
commit
ea4da08af0
1 changed files with 5 additions and 1 deletions
|
@ -732,7 +732,11 @@ fpi_image_device_deactivate_complete (FpImageDevice *self, GError *error)
|
|||
|
||||
/* We might be waiting to be able to activate again. */
|
||||
if (priv->pending_activation_timeout_id)
|
||||
fp_image_device_activate (self);
|
||||
{
|
||||
g_clear_handle_id (&priv->pending_activation_timeout_id, g_source_remove);
|
||||
priv->pending_activation_timeout_id =
|
||||
g_idle_add ((GSourceFunc) fp_image_device_activate, self);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue