[gnome-control-center/wip/hadess/fix-wedged-bluetooth: 2/3] bluetooth: Fix wedged state
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/hadess/fix-wedged-bluetooth: 2/3] bluetooth: Fix wedged state
- Date: Tue, 18 Jan 2022 15:25:32 +0000 (UTC)
commit e9f01607317afe3a574c029be588c76b0b9d6780
Author: Bastien Nocera <hadess hadess net>
Date: Tue Jan 18 11:04:41 2022 +0100
bluetooth: Fix wedged state
Fix a state where toggling the main Bluetooth switch in the header will
always show "Bluetooth turned off", whichever state it's in.
To reproduce, with Bluetooth enabled and working, run
"hciconfig hci0 down" as root, and launch the Bluetooth panel.
See https://gitlab.gnome.org/GNOME/gnome-bluetooth/-/merge_requests/102
panels/bluetooth/cc-bluetooth-panel.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/panels/bluetooth/cc-bluetooth-panel.c b/panels/bluetooth/cc-bluetooth-panel.c
index 8864e47a2..5c04ef0b2 100644
--- a/panels/bluetooth/cc-bluetooth-panel.c
+++ b/panels/bluetooth/cc-bluetooth-panel.c
@@ -100,8 +100,13 @@ airplane_mode_changed_cb (GObject *source_object,
g_warning ("Failed to change Bluetooth killswitch state to %s: %s",
state ? "on" : "off", error->message);
} else {
+ CcBluetoothPanel *self = user_data;
+
g_debug ("Changed Bluetooth killswitch state to %s",
state ? "on" : "off");
+
+ if (!bluetooth_settings_widget_get_default_adapter_powered (self->settings_widget))
+ bluetooth_settings_widget_set_default_adapter_powered(self->settings_widget, TRUE);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]