mirror of
https://github.com/quickshell-mirror/quickshell.git
synced 2026-10-27 02:54:36 +00:00
bluetooth: do not try to enable rfkilled devices
Bluez will not do this and reports a property change failure.
This commit is contained in:
1 file changed
+6
@@ -53,6 +53,12 @@ QString BluetoothAdapter::adapterId() const {
|
||||
|
||||
void BluetoothAdapter::setEnabled(bool enabled) {
|
||||
if (enabled == this->bEnabled) return;
|
||||
|
||||
if (enabled && this->bState == BluetoothAdapterState::Blocked) {
|
||||
qCCritical(logAdapter) << "Cannot enable adapter because it is blocked by rfkill.";
|
||||
return;
|
||||
}
|
||||
|
||||
this->bEnabled = enabled;
|
||||
this->pEnabled.write();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user