[gnome-shell/wip/carlosg/clutter-seat: 92/96] ui: Use ClutterSeat for keyboard/pointer a11y
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/clutter-seat: 92/96] ui: Use ClutterSeat for keyboard/pointer a11y
- Date: Fri, 10 Jan 2020 16:39:35 +0000 (UTC)
commit 40c84e3532c0737799ab8066cb27cde825fb177a
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Oct 5 12:35:21 2019 +0200
ui: Use ClutterSeat for keyboard/pointer a11y
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/760
js/ui/kbdA11yDialog.js | 8 ++++----
js/ui/keyboard.js | 4 ++--
js/ui/pointerA11yTimeout.js | 6 +++---
js/ui/status/dwellClick.js | 6 +++---
4 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/js/ui/kbdA11yDialog.js b/js/ui/kbdA11yDialog.js
index 877c4327ad..f5aa3d3899 100644
--- a/js/ui/kbdA11yDialog.js
+++ b/js/ui/kbdA11yDialog.js
@@ -15,12 +15,12 @@ class KbdA11yDialog extends GObject.Object {
this._a11ySettings = new Gio.Settings({ schema_id: KEYBOARD_A11Y_SCHEMA });
- let deviceManager = Clutter.DeviceManager.get_default();
- deviceManager.connect('kbd-a11y-flags-changed',
- this._showKbdA11yDialog.bind(this));
+ let seat = Clutter.get_default_backend().get_default_seat();
+ seat.connect('kbd-a11y-flags-changed',
+ this._showKbdA11yDialog.bind(this));
}
- _showKbdA11yDialog(deviceManager, newFlags, whatChanged) {
+ _showKbdA11yDialog(seat, newFlags, whatChanged) {
let dialog = new ModalDialog.ModalDialog();
let title, body;
let key, enabled;
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index b845c6dccc..6036ea6b2c 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -1821,8 +1821,8 @@ class Keyboard extends St.BoxLayout {
var KeyboardController = class {
constructor() {
- let deviceManager = Clutter.DeviceManager.get_default();
- this._virtualDevice = deviceManager.create_virtual_device(Clutter.InputDeviceType.KEYBOARD_DEVICE);
+ let seat = Clutter.get_default_backend().get_default_seat();
+ this._virtualDevice = seat.create_virtual_device(Clutter.InputDeviceType.KEYBOARD_DEVICE);
this._inputSourceManager = InputSourceManager.getInputSourceManager();
this._sourceChangedId = this._inputSourceManager.connect('current-source-changed',
diff --git a/js/ui/pointerA11yTimeout.js b/js/ui/pointerA11yTimeout.js
index eebe9e72e7..263cc3eaf2 100644
--- a/js/ui/pointerA11yTimeout.js
+++ b/js/ui/pointerA11yTimeout.js
@@ -108,9 +108,9 @@ var PieTimer = GObject.registerClass({
var PointerA11yTimeout = class PointerA11yTimeout {
constructor() {
- let manager = Clutter.DeviceManager.get_default();
+ let seat = Clutter.get_default_backend().get_default_seat();
- manager.connect('ptr-a11y-timeout-started', (o, device, type, timeout) => {
+ seat.connect('ptr-a11y-timeout-started', (o, device, type, timeout) => {
let [x, y] = global.get_pointer();
this._pieTimer = new PieTimer();
@@ -123,7 +123,7 @@ var PointerA11yTimeout = class PointerA11yTimeout {
global.display.set_cursor(Meta.Cursor.CROSSHAIR);
});
- manager.connect('ptr-a11y-timeout-stopped', (o, device, type, clicked) => {
+ seat.connect('ptr-a11y-timeout-stopped', (o, device, type, clicked) => {
if (!clicked)
this._pieTimer.destroy();
diff --git a/js/ui/status/dwellClick.js b/js/ui/status/dwellClick.js
index 9065ed8561..c194d33291 100644
--- a/js/ui/status/dwellClick.js
+++ b/js/ui/status/dwellClick.js
@@ -48,8 +48,8 @@ class DwellClickIndicator extends PanelMenu.Button {
this._a11ySettings.connect(`changed::${KEY_DWELL_CLICK_ENABLED}`,
this._syncMenuVisibility.bind(this));
this._a11ySettings.connect(`changed::${KEY_DWELL_MODE}`, this._syncMenuVisibility.bind(this));
- this._deviceManager = Clutter.DeviceManager.get_default();
- this._deviceManager.connect('ptr-a11y-dwell-click-type-changed', this._updateClickType.bind(this));
+ this._seat = Clutter.get_default_backend().get_default_seat();
+ this._seat.connect('ptr-a11y-dwell-click-type-changed', this._updateClickType.bind(this));
this._addDwellAction(DWELL_CLICK_MODES.primary);
this._addDwellAction(DWELL_CLICK_MODES.double);
@@ -80,7 +80,7 @@ class DwellClickIndicator extends PanelMenu.Button {
}
_setClickType(mode) {
- this._deviceManager.set_pointer_a11y_dwell_click_type(mode.type);
+ this._seat.set_pointer_a11y_dwell_click_type(mode.type);
this._icon.icon_name = mode.icon;
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]