From 19df3c5e40acbf4fda54eacd67e1d6c905293a0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= Date: Sun, 19 May 2024 19:52:03 -0400 Subject: [PATCH] usb: Reset the state when cancelling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Hubert Figuière --- src/usb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/usb.c b/src/usb.c index 738556c0d..7ee702a96 100644 --- a/src/usb.c +++ b/src/usb.c @@ -1055,6 +1055,10 @@ usb_access_devices_cb (GObject *source_object, g_clear_pointer (&options, g_variant_unref); } } + else if (response == XDG_DESKTOP_PORTAL_RESPONSE_CANCELLED) + { + sender_info->sender_state = USB_SENDER_STATE_DEFAULT; + } out: if (request->exported)