diff options
author | Benjamin Berg <bberg@redhat.com> | 2019-03-18 15:55:44 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2019-03-21 10:34:00 +0000 |
commit | 44e4014f1c049bdc072e73160cd6a3f657e6d6b2 (patch) | |
tree | a1a74ef02663783b5e0c7f0de49e7ad2800d09ec /lib | |
parent | 560acdbe897365b2f2c4b950fc2078b9b505d314 (diff) | |
download | gnome-bluetooth-44e4014f1c049bdc072e73160cd6a3f657e6d6b2.tar.gz |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bluetooth-settings-widget.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bluetooth-settings-widget.c b/lib/bluetooth-settings-widget.c index efa09521..da1898fa 100644 --- a/lib/bluetooth-settings-widget.c +++ b/lib/bluetooth-settings-widget.c @@ -1974,8 +1974,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); |