Blame SOURCES/0018-fp-image-device-Reactivate-in-idle-on-deactivation-c.patch

73b847
From ea4da08af014343bffa6254d78514c2f3076575b Mon Sep 17 00:00:00 2001
73b847
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
73b847
Date: Fri, 22 Nov 2019 13:19:03 +0100
73b847
Subject: [PATCH 018/181] fp-image-device: Reactivate in idle on deactivation
73b847
 completed
73b847
73b847
This is the same logic we apply to fp-device by default: any completed
73b847
action should trigger the subsequent one when it is finished.
73b847
So in case we want reactivate after a deactivation, let's do it in an idle,
73b847
after removing the current pending timeout.
73b847
---
73b847
 libfprint/fp-image-device.c | 6 +++++-
73b847
 1 file changed, 5 insertions(+), 1 deletion(-)
73b847
73b847
diff --git a/libfprint/fp-image-device.c b/libfprint/fp-image-device.c
73b847
index 9aa9e1f..84b1bb0 100644
73b847
--- a/libfprint/fp-image-device.c
73b847
+++ b/libfprint/fp-image-device.c
73b847
@@ -732,7 +732,11 @@ fpi_image_device_deactivate_complete (FpImageDevice *self, GError *error)
73b847
 
73b847
   /* We might be waiting to be able to activate again. */
73b847
   if (priv->pending_activation_timeout_id)
73b847
-    fp_image_device_activate (self);
73b847
+    {
73b847
+      g_clear_handle_id (&priv->pending_activation_timeout_id, g_source_remove);
73b847
+      priv->pending_activation_timeout_id =
73b847
+        g_idle_add ((GSourceFunc) fp_image_device_activate, self);
73b847
+    }
73b847
 }
73b847
 
73b847
 /**
73b847
-- 
73b847
2.24.1
73b847