diff --git a/libfprint/fp-image-device.c b/libfprint/fp-image-device.c index 65cca16..44de578 100644 --- a/libfprint/fp-image-device.c +++ b/libfprint/fp-image-device.c @@ -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); diff --git a/meson.build b/meson.build index cf277f5..ef352ba 100644 --- a/meson.build +++ b/meson.build @@ -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])