lookingGlass: Use ClutterSeat to fetch devices
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/760
This commit is contained in:
parent
484dd98448
commit
bd016c6b49
@ -531,9 +531,9 @@ var Inspector = GObject.registerClass({
|
|||||||
eventHandler.connect('scroll-event', this._onScrollEvent.bind(this));
|
eventHandler.connect('scroll-event', this._onScrollEvent.bind(this));
|
||||||
eventHandler.connect('motion-event', this._onMotionEvent.bind(this));
|
eventHandler.connect('motion-event', this._onMotionEvent.bind(this));
|
||||||
|
|
||||||
let dm = Clutter.DeviceManager.get_default();
|
let seat = Clutter.get_default_backend().get_default_seat();
|
||||||
this._pointerDevice = dm.get_core_device(Clutter.InputDeviceType.POINTER_DEVICE);
|
this._pointerDevice = seat.get_pointer();
|
||||||
this._keyboardDevice = dm.get_core_device(Clutter.InputDeviceType.KEYBOARD_DEVICE);
|
this._keyboardDevice = seat.get_keyboard();
|
||||||
|
|
||||||
this._pointerDevice.grab(eventHandler);
|
this._pointerDevice.grab(eventHandler);
|
||||||
this._keyboardDevice.grab(eventHandler);
|
this._keyboardDevice.grab(eventHandler);
|
||||||
|
Loading…
Reference in New Issue
Block a user