[gnome-bluetooth/gnome-3-28] settings: Disable discovering when settings widget is destroyed



commit 2209baab9b3b47ba1c31f6e27fe2c80fc128dc0f
Author: Benjamin Berg <bberg redhat com>
Date:   Mon Mar 18 15:55:44 2019 +0100

    settings: Disable discovering when settings widget is destroyed
    
    As with discoverability, we need to disable discovery when the settings
    widget is destroyed. This fixes an issue where we keep discovering when
    switching away from the bluetooth panel in g-c-c. This is mainly an
    issue as it may impact the performance of established bluetooth
    connections.

 lib/bluetooth-settings-widget.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/lib/bluetooth-settings-widget.c b/lib/bluetooth-settings-widget.c
index 38ed31f0..f77d8100 100644
--- a/lib/bluetooth-settings-widget.c
+++ b/lib/bluetooth-settings-widget.c
@@ -1969,8 +1969,10 @@ bluetooth_settings_widget_finalize (GObject *object)
 
        /* See default_adapter_changed () */
        /* FIXME: This is blocking */
-       if (priv->client)
+       if (priv->client) {
+               g_object_set (G_OBJECT (priv->client), "default-adapter-discovering", FALSE, NULL);
                g_object_set (G_OBJECT (priv->client), "default-adapter-discoverable", FALSE, NULL);
+       }
 
        g_cancellable_cancel (priv->cancellable);
        g_clear_object (&priv->cancellable);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]