mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
image-device: Use g_clear_handle_id for timeouts
As per this depend on glib 2.56: it has been released almost 2 years ago, I suppose we're fine with that.
This commit is contained in:
@@ -80,11 +80,7 @@ fp_image_device_change_state (FpImageDevice *self, FpImageDeviceState state)
|
||||
|
||||
/* We might have been waiting for the finger to go OFF to start the
|
||||
* next operation. */
|
||||
if (priv->pending_activation_timeout_id)
|
||||
{
|
||||
g_source_remove (priv->pending_activation_timeout_id);
|
||||
priv->pending_activation_timeout_id = 0;
|
||||
}
|
||||
g_clear_handle_id (&priv->pending_activation_timeout_id, g_source_remove);
|
||||
|
||||
fp_dbg ("Image device internal state change from %d to %d\n", priv->state, state);
|
||||
|
||||
@@ -110,11 +106,7 @@ fp_image_device_activate (FpImageDevice *self)
|
||||
|
||||
/* We might have been waiting for deactivation to finish before
|
||||
* starting the next operation. */
|
||||
if (priv->pending_activation_timeout_id)
|
||||
{
|
||||
g_source_remove (priv->pending_activation_timeout_id);
|
||||
priv->pending_activation_timeout_id = 0;
|
||||
}
|
||||
g_clear_handle_id (&priv->pending_activation_timeout_id, g_source_remove);
|
||||
|
||||
fp_dbg ("Activating image device\n");
|
||||
cls->activate (self);
|
||||
|
||||
Reference in New Issue
Block a user