[gnome-shell/wip/carlosg/clutter-seat: 85/88] padOsd: Use ClutterSeat to fetch devices
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/clutter-seat: 85/88] padOsd: Use ClutterSeat to fetch devices
- Date: Wed, 29 Jan 2020 11:24:57 +0000 (UTC)
commit a38efad48e5b16a4f51f5393bd85526057458fb2
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Oct 5 12:36:52 2019 +0200
padOsd: Use ClutterSeat to fetch devices
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/760
js/ui/padOsd.js | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/js/ui/padOsd.js b/js/ui/padOsd.js
index 0cd1cbe3ae..5678be0aea 100644
--- a/js/ui/padOsd.js
+++ b/js/ui/padOsd.js
@@ -648,15 +648,15 @@ var PadOsd = GObject.registerClass({
this._capturedEventId = global.stage.connect('captured-event', this._onCapturedEvent.bind(this));
this._padChooser = null;
- let deviceManager = Clutter.DeviceManager.get_default();
- this._deviceAddedId = deviceManager.connect('device-added', (manager, device) => {
+ let seat = Clutter.get_default_backend().get_default_seat();
+ this._deviceAddedId = seat.connect('device-added', (seat, device) => {
if (device.get_device_type() == Clutter.InputDeviceType.PAD_DEVICE &&
this.padDevice.is_grouped(device)) {
this._groupPads.push(device);
this._updatePadChooser();
}
});
- this._deviceRemovedId = deviceManager.connect('device-removed', (manager, device) => {
+ this._deviceRemovedId = seat.connect('device-removed', (seat, device) => {
// If the device is being removed, destroy the padOsd.
if (device == this.padDevice) {
this.destroy();
@@ -669,7 +669,7 @@ var PadOsd = GObject.registerClass({
}
});
- deviceManager.list_devices().forEach(device => {
+ seat.list_devices().forEach(device => {
if (device != this.padDevice &&
device.get_device_type() == Clutter.InputDeviceType.PAD_DEVICE &&
this.padDevice.is_grouped(device))
@@ -960,13 +960,13 @@ var PadOsd = GObject.registerClass({
Main.popModal(this);
this._actionEditor.close();
- let deviceManager = Clutter.DeviceManager.get_default();
+ let seat = Clutter.get_default_backend().get_default_seat();
if (this._deviceRemovedId != 0) {
- deviceManager.disconnect(this._deviceRemovedId);
+ seat.disconnect(this._deviceRemovedId);
this._deviceRemovedId = 0;
}
if (this._deviceAddedId != 0) {
- deviceManager.disconnect(this._deviceAddedId);
+ seat.disconnect(this._deviceAddedId);
this._deviceAddedId = 0;
}
@@ -990,8 +990,8 @@ var PadOsdService = class {
ShowAsync(params, invocation) {
let [deviceNode, editionMode] = params;
- let deviceManager = Clutter.DeviceManager.get_default();
- let devices = deviceManager.list_devices();
+ let seat = Clutter.get_default_backend().get_default_seat();
+ let devices = seat.list_devices();
let padDevice = null;
devices.forEach(device => {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]