[gnome-shell/wip/carlosg/grabs-pt2: 18/25] padOsd: Capture events on itself
- From: Robert Mader <rmader src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/grabs-pt2: 18/25] padOsd: Capture events on itself
- Date: Fri, 28 Jan 2022 12:56:55 +0000 (UTC)
commit 7869055ed15aaf64119f0972084d42572c0f5e01
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Nov 24 17:42:41 2021 +0100
padOsd: Capture events on itself
This actor is setting itself modal, should also stop listening to
events from above it, since none will be gotten.
js/ui/padOsd.js | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/js/ui/padOsd.js b/js/ui/padOsd.js
index 9804f9e305..9de5b49276 100644
--- a/js/ui/padOsd.js
+++ b/js/ui/padOsd.js
@@ -638,7 +638,6 @@ var PadOsd = GObject.registerClass({
this._settings = settings;
this._imagePath = imagePath;
this._editionMode = editionMode;
- this._capturedEventId = global.stage.connect('captured-event', this._onCapturedEvent.bind(this));
this._padChooser = null;
let seat = Clutter.get_default_backend().get_default_seat();
@@ -762,7 +761,7 @@ var PadOsd = GObject.registerClass({
this._padDiagram.updateLabels(this._getActionText.bind(this));
}
- _onCapturedEvent(actor, event) {
+ vfunc_captured_event(event) {
let isModeSwitch =
(event.type() == Clutter.EventType.PAD_BUTTON_PRESS ||
event.type() == Clutter.EventType.PAD_BUTTON_RELEASE) &&
@@ -933,11 +932,6 @@ var PadOsd = GObject.registerClass({
this._deviceAddedId = 0;
}
- if (this._capturedEventId != 0) {
- global.stage.disconnect(this._capturedEventId);
- this._capturedEventId = 0;
- }
-
this.emit('closed');
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]