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:
parent
ceb62d7617
commit
8b270141f3
2 changed files with 3 additions and 11 deletions
|
@ -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);
|
||||
|
|
|
@ -18,7 +18,7 @@ libfprint_conf = configuration_data()
|
|||
cc = meson.get_compiler('c')
|
||||
cpp = meson.get_compiler('cpp')
|
||||
host_system = host_machine.system()
|
||||
glib_min_version = '2.50'
|
||||
glib_min_version = '2.56'
|
||||
|
||||
glib_version_def = 'GLIB_VERSION_@0@_@1@'.format(
|
||||
glib_min_version.split('.')[0], glib_min_version.split('.')[1])
|
||||
|
|
Loading…
Reference in a new issue