mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
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:
@@ -732,7 +732,11 @@ fpi_image_device_deactivate_complete (FpImageDevice *self, GError *error)
|
|||||||
|
|
||||||
/* We might be waiting to be able to activate again. */
|
/* We might be waiting to be able to activate again. */
|
||||||
if (priv->pending_activation_timeout_id)
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user