[gnome-bluetooth/benzea/disable-discovering-on-widget-destruction: 2/2] settings: Disable discovering when settings widget is destroyed
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/benzea/disable-discovering-on-widget-destruction: 2/2] settings: Disable discovering when settings widget is destroyed
- Date: Mon, 18 Mar 2019 14:56:50 +0000 (UTC)
commit 5e7ac4670d6257f83247b8ec5f727cd8d5ece39c
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 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]