thunderbolt: Do not auto start boltd
The service is expected to be activated by systemd when a thunderbolt device is plugged in, so no need to have it auto-started with the session. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/54
This commit is contained in:
parent
1f03599d1c
commit
5fe349d5ba
@ -49,7 +49,6 @@ const BoltDeviceInterface = '<node> \
|
|||||||
</interface> \
|
</interface> \
|
||||||
</node>';
|
</node>';
|
||||||
|
|
||||||
const BoltClientProxy = Gio.DBusProxy.makeProxyWrapper(BoltClientInterface);
|
|
||||||
const BoltDeviceProxy = Gio.DBusProxy.makeProxyWrapper(BoltDeviceInterface);
|
const BoltDeviceProxy = Gio.DBusProxy.makeProxyWrapper(BoltDeviceInterface);
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
@ -78,6 +77,7 @@ var AuthMode = {
|
|||||||
ENABLED: 'enabled'
|
ENABLED: 'enabled'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const BOLT_DBUS_CLIENT_IFACE = 'org.freedesktop.bolt1.Manager';
|
||||||
const BOLT_DBUS_NAME = 'org.freedesktop.bolt';
|
const BOLT_DBUS_NAME = 'org.freedesktop.bolt';
|
||||||
const BOLT_DBUS_PATH = '/org/freedesktop/bolt';
|
const BOLT_DBUS_PATH = '/org/freedesktop/bolt';
|
||||||
|
|
||||||
@ -87,22 +87,26 @@ var Client = new Lang.Class({
|
|||||||
_init() {
|
_init() {
|
||||||
|
|
||||||
this._proxy = null;
|
this._proxy = null;
|
||||||
new BoltClientProxy(
|
let nodeInfo = Gio.DBusNodeInfo.new_for_xml(BoltClientInterface);
|
||||||
Gio.DBus.system,
|
Gio.DBusProxy.new(Gio.DBus.system,
|
||||||
BOLT_DBUS_NAME,
|
Gio.DBusProxyFlags.DO_NOT_AUTO_START,
|
||||||
BOLT_DBUS_PATH,
|
nodeInfo.lookup_interface(BOLT_DBUS_CLIENT_IFACE),
|
||||||
this._onProxyReady.bind(this)
|
BOLT_DBUS_NAME,
|
||||||
);
|
BOLT_DBUS_PATH,
|
||||||
|
BOLT_DBUS_CLIENT_IFACE,
|
||||||
|
null,
|
||||||
|
this._onProxyReady.bind(this));
|
||||||
|
|
||||||
this.probing = false;
|
this.probing = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
_onProxyReady(proxy, error) {
|
_onProxyReady(o, res) {
|
||||||
if (error !== null) {
|
try {
|
||||||
log('error creating bolt proxy: %s'.format(error.message));
|
this._proxy = Gio.DBusProxy.new_finish(res);
|
||||||
return;
|
} catch(e) {
|
||||||
}
|
log('error creating bolt proxy: %s'.format(e.message));
|
||||||
this._proxy = proxy;
|
return;
|
||||||
|
}
|
||||||
this._propsChangedId = this._proxy.connect('g-properties-changed', this._onPropertiesChanged.bind(this));
|
this._propsChangedId = this._proxy.connect('g-properties-changed', this._onPropertiesChanged.bind(this));
|
||||||
this._deviceAddedId = this._proxy.connectSignal('DeviceAdded', this._onDeviceAdded.bind(this));
|
this._deviceAddedId = this._proxy.connectSignal('DeviceAdded', this._onDeviceAdded.bind(this));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user